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

Prevent map move on "keydown" #74

Open
svetoslavmishev opened this issue Feb 22, 2024 · 1 comment
Open

Prevent map move on "keydown" #74

svetoslavmishev opened this issue Feb 22, 2024 · 1 comment

Comments

@svetoslavmishev
Copy link

Unable to prevent map move, when press keyboard arrow keys.

  1. Click on the map
  2. Press keyboard arrow keys (left, right, up or down)

How can I prevent this map movement, but keep dragpan behavior?

@abstractalgo
Copy link
Contributor

Under the hood, there's a deck.gl instance that appends <div> with id="default-deckgl-overlay-wrapper" that has keyup and keydown handlers that actually handle navigation via arrow keys, and removing those event listeners achieves what you're looking for. However, that is wrapped in a Shadow DOM component that doesn't let you interact with its content directly. We could try exposing toggles for this so that you could configure the behavior more granularly.

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

No branches or pull requests

2 participants