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

Make "icon-offset" units be pixels #4078

Closed
lucaswoj opened this issue Feb 1, 2017 · 1 comment
Closed

Make "icon-offset" units be pixels #4078

lucaswoj opened this issue Feb 1, 2017 · 1 comment
Labels
api 📝 breaking change ⚠️ Requires a backwards-incompatible change to the API cross-platform 📺 Requires coordination with Mapbox GL Native (style specification, rendering tests, etc.)

Comments

@lucaswoj
Copy link
Contributor

lucaswoj commented Feb 1, 2017

From @ansis on July 8, 2014 23:26

from #83

The only thing that may cause confusion is that text-offset is in ems, while icon-offset is in pixels. But maybe that's not important.

The current units for icon-offset aren't even exactly pixels. If the icon gets scaled with icon-size then the offset also gets scaled. An icon with "icon-offset": 6 and "icon-size": 0.5 actually has an offset of 3 pixels.

For now the units need to be relative to the unscaled size, not absolute values, but maybe we should changes the units of icon-offset to a fraction of the original size.

Copied from original issue: mapbox/mapbox-gl-style-spec#84

@lucaswoj lucaswoj added the breaking change ⚠️ Requires a backwards-incompatible change to the API label Feb 1, 2017
@lucaswoj lucaswoj changed the title Make "icon-offset" units more intuitive Make "icon-offset" units be pixels Feb 1, 2017
@lucaswoj lucaswoj added cross-platform 📺 Requires coordination with Mapbox GL Native (style specification, rendering tests, etc.) refactoring 🏗️ api 📝 and removed refactoring 🏗️ labels Feb 1, 2017
@jfirebaugh
Copy link
Contributor

Closing here; see #6584.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api 📝 breaking change ⚠️ Requires a backwards-incompatible change to the API cross-platform 📺 Requires coordination with Mapbox GL Native (style specification, rendering tests, etc.)
Projects
None yet
Development

No branches or pull requests

2 participants