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

125 Zooming at max zoom pans map #129

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

dhochbaum-dcp
Copy link
Contributor

@dhochbaum-dcp dhochbaum-dcp commented Dec 20, 2024

Fixed issue where after fully zooming out using the mouse scroller, any more scrolls move the map to the left/down.

The default minZoom for the MapViewState is 0, so the map was attempting to zoom out, only to be manually corrected in the onViewStateChange. By setting the minZoom to be MIN_ZOOM in the initial state, we override the default and make the zoom stop before the manual correction in onViewStateChange would otherwise kick in.

Closes #125

Copy link
Member

@TangoYankee TangoYankee left a comment

Choose a reason for hiding this comment

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

The issue goes away for the home page. But, I get the behavior on pages that included a "zoom to", ie) /boroughs/1/community-districts/01/capital-projects?districtType=cd&boroughId=1&districtId=01

@dhochbaum-dcp dhochbaum-dcp force-pushed the 125/zooming-at-max-zoom-pans-map branch from b62e5c3 to 21dca2e Compare December 24, 2024 19:11
@dhochbaum-dcp
Copy link
Contributor Author

The issue goes away for the home page. But, I get the behavior on pages that included a "zoom to", ie) /boroughs/1/community-districts/01/capital-projects?districtType=cd&boroughId=1&districtId=01

Thanks, good catch. I've fixed that as well.

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.

Zooming at max zoom pans map
3 participants