fix(renderer): respect text z-index ordering - #93
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0896fdee22
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| recorder.measureText = function(text) { | ||
| return ctx.measureText(text); | ||
| }; |
There was a problem hiding this comment.
Measure text with pending style updates
The command recorder defers style assignments (including font) until replay(), but recorder.measureText() calls ctx.measureText() immediately against the live canvas state. In _renderTextAndIcons, text/shield collision checks and placement run before replay, so widths are computed with stale fonts whenever a feature sets a different font size/family, which can incorrectly reject labels or allow overlaps. This regression is introduced by the new recording path and affects any map with mixed text styles.
Useful? React with 👍 / 👎.
Signed-off-by: Darafei Praliaskouski <me@komzpa.net>
0896fde to
797a3f1
Compare
Summary
Fixes #63.
Validation
npm test