Deck.gl: Strange map position jumps with shift key.

Created on 10 Nov 2020  路  3Comments  路  Source: visgl/deck.gl

Description

If you press the Shift key during a drag and rotate movement, then release it and press it again, the map jumps strangely back and forth. Shift has to be pressed while moving, hold it for a moment, release it and keep moving the mouse.

Repro Steps

1) Open a deck.gl map -> https://deck.gl/examples/arc-layer/
2) use the left mouse button to drag the map.
3) keep dragging.
4) press shift, hold for 2 sec, release (keep dragging the map)
5) loop from 3)

Environment

  • Framework Version: see example page
  • Browser Version: Chrome Version 81.0.4044.129 (official build) (64-Bit)
  • OS: Ubuntu 20.04
bug

Most helpful comment

The controller is confused between whether you are trying to pan or rotate. The way Mapbox handles it is that if function key is down when drag starts it'll rotate, otherwise it'll pan, and you cannot switch midway. Would that be acceptable?

All 3 comments

The controller is confused between whether you are trying to pan or rotate. The way Mapbox handles it is that if function key is down when drag starts it'll rotate, otherwise it'll pan, and you cannot switch midway. Would that be acceptable?

Yes that is a good idea. I think this is better than the current behavior.

The fix is scheduled for 8.4.0.

Was this page helpful?
0 / 5 - 0 ratings