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

zoom to integer levels #4148

Closed
wants to merge 1 commit into from
Closed

zoom to integer levels #4148

wants to merge 1 commit into from

Conversation

hyperknot
Copy link
Collaborator

Round target zoom levels for zoom controls, like it's done at DoubleClickZoom already:

zoom = e.originalEvent.shiftKey ? Math.ceil(oldZoom) - 1 : Math.floor(oldZoom) + 1;

@IvanSanchez
Copy link
Member

No. See #3523 - with fractional zoom, it's not about rounding anymore, it's about snapping to a number defined as a map option (default 1).

@hyperknot I would appreciate if you could review that PR, though.

@hyperknot
Copy link
Collaborator Author

It'll take some time to read #3523 and the linked issues in that one, but as of now, there is inconsistent behaviour between DoubleClickZoom (13.5 -> 14 -> 15) and zoom controls (13.5 -> 14.5 -> 15.5).

@IvanSanchez
Copy link
Member

@hyperknot I see your point, but I'd rather work on #3523 instead of patching this up and creating a merge conflict :-/

@hyperknot
Copy link
Collaborator Author

@IvanSanchez I agree, I'll review that one.

@hyperknot hyperknot deleted the integer-zoom-control branch January 16, 2016 01:24
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.

None yet

3 participants