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

feat: add resetViewOnly prop to retain data but reset map position #496

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

jessicamcinchak
Copy link
Member

@jessicamcinchak jessicamcinchak commented Sep 6, 2024

By default, the "Reset" control is responsible for two things:

  • Resetting the map viewport based on displayed data or center coordinate & zoom configs
  • Clearing all data from the drawing source if drawMode is enabled

This adds a new prop resetViewOnly that allows us to still show a "Reset" control when in drawMode, but retain data when clicked and only reset the map viewport. This is useful if you want a "Remove" button to live in another part of your UI - like we're doing in PlanX here theopensystemslab/planx-new#3625

@jessicamcinchak jessicamcinchak requested a review from a team September 6, 2024 08:12
Copy link

netlify bot commented Sep 6, 2024

Deploy Preview for oslmap ready!

Name Link
🔨 Latest commit 86b8de9
🔍 Latest deploy log https://app.netlify.com/sites/oslmap/deploys/66dab983d559c60008560561
😎 Deploy Preview https://deploy-preview-496--oslmap.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@jessicamcinchak jessicamcinchak merged commit a313267 into main Sep 6, 2024
5 checks passed
@jessicamcinchak jessicamcinchak deleted the jess/reset-view-only branch September 6, 2024 08:45
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.

2 participants