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

Try other placements when the the icon is collided out #8803

Merged
merged 1 commit into from
Oct 15, 2019

Conversation

kkaefer
Copy link
Member

@kkaefer kkaefer commented Sep 25, 2019

Symbol placement currently doesn't try other placements for text-variable-anchor if the associated icon has a collision, but not the text itself. This patch fixes that.

Before (note how the entire symbol vanishes instead of using another anchor):

collision-before

After:

collision-after

  • render tests
  • port to GL Native

Copy link
Member Author

@kkaefer kkaefer left a comment

Choose a reason for hiding this comment

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

(Can't approve because I'm the creator of the PR)
The part of this PR that's about icon collisions looks good. Let's merge once #8835 landed.

When icon-text-fit-padding is used the collision box of the icon is
different than the collision box of the text. It now checks whether
the icon box fits when choosing a variable text position.
@ansis ansis force-pushed the fix-icon-text-fit-variable branch from c1d6294 to 9e7d759 Compare October 15, 2019 21:22
Copy link
Contributor

@arindam1993 arindam1993 left a comment

Choose a reason for hiding this comment

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

LGTM

@ansis ansis merged commit 61a61a1 into master Oct 15, 2019
@ansis ansis deleted the fix-icon-text-fit-variable branch October 15, 2019 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants