You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Click on the same feature once more without moving the mouse
Expected Behavior
If the dragPan option (map.dragPan) was enabled before interacting with the feature (map.dragPan.isEnabled() is true), it should remain enabled after the interaction.
Actual Behavior
dragPan is disabled
Context
It seems the issue was introduced in this PR: #1216
Clicking a feature at least twice without moving the mouse triggers DirectSelect.startDragging twice in a row, without ever calling DirectSelect.stopDragging in between. As a result, dragPan is disabled, and the initialDragPanState property in the state is set to false, making it unable to return to true in subsequent stopDragging calls.
I think one potential solution would involve removing the premature returns from DirectSelect.onClick to ensure that stopDragging is always invoked between consecutive clicks. (Note that in the mentioned case, DirectSelect.onMouseUp is not called, only DirectSelect.onClick.)
The text was updated successfully, but these errors were encountered:
mapbox-gl-js version: 3.8.0
mapbox-gl-draw version: 1.5.0
Steps to Trigger Behavior
Expected Behavior
If the dragPan option (
map.dragPan
) was enabled before interacting with the feature (map.dragPan.isEnabled()
istrue
), it should remain enabled after the interaction.Actual Behavior
dragPan is disabled
Context
It seems the issue was introduced in this PR: #1216
Clicking a feature at least twice without moving the mouse triggers
DirectSelect.startDragging
twice in a row, without ever callingDirectSelect.stopDragging
in between. As a result,dragPan
is disabled, and theinitialDragPanState
property in the state is set to false, making it unable to return to true in subsequentstopDragging
calls.I think one potential solution would involve removing the premature returns from
DirectSelect.onClick
to ensure thatstopDragging
is always invoked between consecutive clicks. (Note that in the mentioned case,DirectSelect.onMouseUp
is not called, onlyDirectSelect.onClick
.)The text was updated successfully, but these errors were encountered: