Skip to content

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

Merged
ansis merged 1 commit into
masterfrom
fix-icon-text-fit-variable
Oct 15, 2019
Merged

ansis merged 1 commit into
masterfrom
fix-icon-text-fit-variable

Conversation

@kkaefer

@kkaefer kkaefer commented Sep 25, 2019

Copy link
Copy Markdown
Member

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

@kkaefer kkaefer left a comment

Copy link
Copy Markdown
Member Author

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

@arindam1993 arindam1993 left a comment

Copy link
Copy Markdown
Contributor

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.

4 participants