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

Introduce deadzone around MapControls #2560

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ajoensson
Copy link
Collaborator

@ajoensson ajoensson commented Feb 15, 2025

Description

This PR introduces a deadzone around the MapControls-component. This deadzone is there to prevent inaccurate clicks or taps (which is more likely on touch devices) to accidentally interact with the map, which could cause accidental pans or zooms.

Screenshots

Highlighting the (green) padding, which is acting as the deadzone, using the Chrome inspector:
Screenshot 2025-02-15 at 14 24 41

Changes

  • Add padding around the MapControls, creating an area that is noninteractive ("deadzone")
  • Adjust positioning to account for the new padding. Making sure the MapControls appear on the same place as before these changes.

Notes to reviewer

It is not entirely sure that this is the correct way to solve this issue. See the discussion in the related issue, before merging this PR!

Related issues

Resolves #2549 (well, maybe)

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.

Canvassing: Unintentional map panning
1 participant