This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I started out trying to fix the OS X SDK’s Zoom Out button, which refused to disable even as you reach the effective minimum zoom level. I wound up fixing a few related issues:
TransformState
has the final say over whether a zoom level is allowed.TransformState::constrainMode
isHeightOnly
, there isn’t usually a reason to show more than one full revolution of the world at a time. Before this change, osxapp effectively constrained the zoom level based on whether the window was shorter or taller than 512 points. (Maps.app constrains the zoom level even further in standard view, but that’s because its satellite view is projected onto a globe, so it’s more appropriate at low zoom levels.)Transform::getMinZoom()
to account for the constrained zoom level.These changes have the side effect of fixing an issue in the iOS SDK, in which the minimum zoom level in portrait can be circumvented by zooming out in landscape then rotating the device. Now the two orientations have consistent minimum zoom levels, which fully fixes #1755.
/cc @brunoabinader @friedbunny @zugaldia