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

implement symbol-avoid-edges #1951

Merged
merged 1 commit into from
Jan 20, 2016
Merged

implement symbol-avoid-edges #1951

merged 1 commit into from
Jan 20, 2016

Conversation

ansis
Copy link
Contributor

@ansis ansis commented Jan 20, 2016

Prevent symbols from colliding with tile edges when symbol-avoid-edges is true.

ref mapbox/mapbox-gl-native#3582

render tests: mapbox/mapbox-gl-test-suite@bc0272c

@ansis
Copy link
Contributor Author

ansis commented Jan 20, 2016

@lucaswoj can you review?

// But the label can be shown after this box is not visible.
collisionFreeScale = box.maxScale;
}
CollisionTile.prototype.checkForCollision = function(minPlacementScale, anchorPoint, box, blockingAnchorPoint, blocking) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it make more sense for this method to be called findEdgeMinPlacementScale?

Copy link
Contributor

Choose a reason for hiding this comment

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

I suppose keeping these method names as similar as possible to those in native is most important.

@lucaswoj
Copy link
Contributor

Looks 👍 overall. Ready to ship once minor comments are addressed.

if `symbol-avoid-edges` is true, this prevents symbols from colliding
with tile edges.
@ansis ansis merged commit f023f65 into master Jan 20, 2016
@ansis ansis removed the in progress label Jan 20, 2016
@ansis ansis deleted the symbol-avoid-edges branch February 20, 2016 01:05
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.

2 participants