Fix zoom-to-data not re-fitting when custom data is already visible#11941
Open
Shyam-123pandey wants to merge 2 commits intoopenstreetmap:developfrom
Open
Fix zoom-to-data not re-fitting when custom data is already visible#11941Shyam-123pandey wants to merge 2 commits intoopenstreetmap:developfrom
Shyam-123pandey wants to merge 2 commits intoopenstreetmap:developfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the “Zoom to Data” behavior for custom map data so it always recalculates and re-fits the dataset extent, even when the data is already within the current viewport.
Changes:
- Removed the viewport intersection guard so
fitZoom()always recenters/rezooms to the custom data extent.
…fter resolved copilot suggetion
This comment has been minimized.
This comment has been minimized.
Collaborator
|
The video looks good. The code as well (just from looking at GitHub). |
Author
|
ok nice. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
When clicking Zoom to Data in the Custom Data panel, the map only re-fits if the dataset is outside the current viewport.
If the user zooms out while keeping the data visible and then clicks the button, nothing happens.
This change removes the viewport intersection check so that Zoom to Data always re-calculates and re-fits the dataset extent.
Please don't forget to take a look of fix vedio: https://drive.google.com/file/d/1ts-RBJWoWiSWPAtmZAAa26QTNk3jcIEk/view?usp=sharing
Now the behavior is consistent across:
Initial upload
Panning away
Zooming out while data remains visible
closes "Zoom To Selection" for "Custom Map Data" is 4 zoom levels too high #9287