Skip to content

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
@netlify
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
@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.

3 participants