-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apply text-keep-upright after text-offset #4779
Conversation
8c55a7e
to
6a8919a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there's a collision problem here: the CollisionFeature
for a label will get its box from the Shaping
, which assumes it's upright, but then if the quads are drawn flipped their offsets won't match the offsets of their collision boxes. We re-generate the collision tile every time we do placement, so it's no problem to update the collision boxes, but we may want to move the text-offset
logic from CollisionFeature
(which is just generated at tile parse time) to CollisionTile#insert/placeCollisionFeature
.
I think this change makes sense but are there any cases where the current behavior is the desired one? Is this a breaking change? |
@ChrisLoer looks like the collision problem already exists -- filed as a separate issue here: #4798 |
@jfirebaugh got confirmation from @nickidlugash that it's reasonable from the carto team's point of view to consider this a bug fix. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Thanks for looking through the details of how this interacts with *-anchor
properties, etc
This should be good to merge and I'll rebase #4781 on it
Do the integration tests pass in -native? |
@jfirebaugh just chatted with @ansis about this when I realized I'd forgotten to mark them ignored -- since the shaders here are already ahead of native, he's going to make sure this fix is included in the stuff he's working on. |
Closes #2350