Skip to content
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

Fix collision boxes for text with variable placement #10709

Merged
merged 1 commit into from
May 27, 2021

Conversation

arindam1993
Copy link
Contributor

@arindam1993 arindam1993 commented May 26, 2021

With the move to evaluating collision boxes on the main-thread ,we missed one case where symbols with text-variable-anchor was still using the box sizing for text determined at layout time.
This was causing collision boxes to start off correct but then drift at fractional zoom levels.

gl.js.v2.2.mov

This PR fixes it by evaluating the box sizing on the main thread.

Before:

Screen Shot 2021-05-25 at 3 26 39 PM

After:

actual

Launch Checklist

  • briefly describe the changes in this PR
  • include before/after visuals or gifs if this PR includes visual changes
  • write tests for all new functionality
  • manually test the debug page
  • apply changelog label ('bug', 'feature', 'docs', etc) or use the label 'skip changelog'
  • add an entry inside this element for inclusion in the mapbox-gl-js changelog: <changelog>Fix collision boxes for text with variable placement</changelog>

@karimnaaji
Copy link
Contributor

karimnaaji commented May 26, 2021

cc @zmiao for native

@karimnaaji karimnaaji requested a review from zmiao May 26, 2021 22:29
Copy link
Contributor

@karimnaaji karimnaaji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch @arindam1993 , looks good to me.

@arindam1993 arindam1993 merged commit 30faf71 into main May 27, 2021
@arindam1993 arindam1993 deleted the fix-variable-offset-collision branch May 27, 2021 17:34
rreusser added a commit that referenced this pull request Jun 21, 2021
* Migrate github size chekcer app and aws creds to mbx-ci (#10719)

* Fix collision boxes for text with variable placement (#10709)

* Add 10709 to changelog

Co-authored-by: Arindam Bose <arindam.bose@mapbox.com>
SnailBones pushed a commit to SnailBones/mapbox-gl-js that referenced this pull request Jul 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants