fsq-studio-sdk-examples
fsq-studio-sdk-examples copied to clipboard
Prevent map move on "keydown"
Unable to prevent map move, when press keyboard arrow keys.
- Click on the map
- Press keyboard arrow keys (left, right, up or down)
How can I prevent this map movement, but keep dragpan behavior?
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.