Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

[core] Do not try to place a center anchor beyond the center of the line - #15177

Merged
tmpsantos merged 2 commits into
masterfrom
tmpsantos-label_wrapping_center_anchor
Jul 19, 2019
Merged

tmpsantos merged 2 commits into
masterfrom
tmpsantos-label_wrapping_center_anchor

Conversation

@tmpsantos

Copy link
Copy Markdown
Contributor

Once the algorithm finds the center of the line, if placement is not possible, do not place the anchor.

Previous code was trying to continue place the label beyond the center of the segment. This aligns the behavior with GL JS.

Fixes #15139.

@tmpsantos
tmpsantos requested a review from alexshalamov July 19, 2019 11:51
@tmpsantos tmpsantos self-assigned this Jul 19, 2019
@tmpsantos tmpsantos added bug Core The cross-platform C++ core, aka mbgl labels Jul 19, 2019

@alexshalamov alexshalamov 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

looks like gl-gs master has few *-sort-key features landed, should be disabled for gl-native util backported.

Comment thread src/mbgl/text/get_anchors.cpp Outdated
Comment thread src/mbgl/text/get_anchors.cpp Outdated
@tmpsantos
tmpsantos force-pushed the tmpsantos-label_wrapping_center_anchor branch from 9aa237e to c105939 Compare July 19, 2019 12:13
Once the algorithm finds the center of the line, if placement is
not possible, do not place the anchor.

Previous code was trying to continue place the label beyond the center
of the segment.

Fixes #15139.
@tmpsantos
tmpsantos force-pushed the tmpsantos-label_wrapping_center_anchor branch 2 times, most recently from 454bd27 to ea38006 Compare July 19, 2019 12:29
@tmpsantos
tmpsantos force-pushed the tmpsantos-label_wrapping_center_anchor branch from ea38006 to 7eea0ce Compare July 19, 2019 12:43
@tmpsantos
tmpsantos requested a review from 1ec5 as a code owner July 19, 2019 12:43
@tmpsantos
tmpsantos requested a review from a team July 19, 2019 12:43
@tmpsantos
tmpsantos merged commit 1aa4776 into master Jul 19, 2019
@tmpsantos
tmpsantos deleted the tmpsantos-label_wrapping_center_anchor branch July 19, 2019 13:17
@friedbunny friedbunny added this to the release-q milestone Jul 19, 2019
@friedbunny friedbunny added the needs changelog Indicates PR needs a changelog entry prior to merging. label Jul 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Core The cross-platform C++ core, aka mbgl needs changelog Indicates PR needs a changelog entry prior to merging.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[core] Labels wrapping around themselves

4 participants