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 icon/text-rotate #515

Merged
merged 2 commits into from
Jul 7, 2014
Merged

Implement icon/text-rotate #515

merged 2 commits into from
Jul 7, 2014

Conversation

mourner
Copy link
Member

@mourner mourner commented Jul 7, 2014

Implement icon-rotate & text-rotate (specified in degrees).

@ansis
Copy link
Contributor

ansis commented Jul 7, 2014

I think my suggestion to implement this in drawsymbol was wrong. Rotation should probably happen earlier so that the rotated box gets used for collision detection.

if (angle) {

It looks like text-rotate was already implemented, but not as degrees

var rotate = props['text-rotate'];

@mourner
Copy link
Member Author

mourner commented Jul 7, 2014

It seems that it's not that important for icons, because margin of error will be small due to icons being square, and collision detection using axis-parallel bboxes for icons anyway (I wouldn't want to go through full-blown rotation range detection for icons as this would be slow). We can merge now and then fix later.

Also, in the spec, -rotate are not render properties, but class properties, so they can't be processed on the placing step. E.g. they support functions etc.

@ansis
Copy link
Contributor

ansis commented Jul 7, 2014

In the current spec icon-rotate is a class property but text-rotate is a render property. Which should they be? https://github.com/mapbox/mapbox-gl-style-spec/blob/dfad56e1af566ab33927412285b0ab5e3ba79b8b/reference/v4.json#L372

We can merge now and then fix later.

ok

mourner added a commit that referenced this pull request Jul 7, 2014
@mourner mourner merged commit b03a215 into master Jul 7, 2014
@mourner mourner deleted the icon-rotate branch July 7, 2014 22:53
bensleveritt pushed a commit to bensleveritt/mapbox-gl-js that referenced this pull request Oct 24, 2016
add release instructions to readme
lucaswoj pushed a commit that referenced this pull request Jan 11, 2017
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