maplibre / maplibre-gl-js

MapLibre GL JS - Interactive vector tile maps in the browser
https://maplibre.org/maplibre-gl-js/docs/
Other
6.72k stars 718 forks source link

Map ends up with roll when rollEnabled=false #5083

Open NathanMOlson opened 4 days ago

NathanMOlson commented 4 days ago

maplibre-gl-js version: 5.0.0-pre.3, 5.0.0-pre.7

browser: Chrome

Steps to Trigger Behavior

  1. Pitch the map to approximately pitch=0.
  2. "Throw" the map. (Give it a quick rotation so that it continues rotating when you let go of the mouse button).
  3. Before the map stops rotating, interrupt the motion by clicking on the map again
  4. Pitch the map. You will see that the map is now rolled.

Demonstration

https://github.com/user-attachments/assets/6fdda8ea-6550-4177-934e-8fbe30f7351a

Expected Behavior

When rollEnabled=false, no user mouse input causes the map to roll.

Actual Behavior

When rollEnabled=false, the map ends up rolled when rotations near pitch = 0 are interrupted.

HarelM commented 4 days ago

@NathanMOlson should I be assigning this issue to you?

NathanMOlson commented 4 days ago

@NathanMOlson should I be assigning this issue to you?

Sure, I introduced this and I know how to fix it.