-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Map.isMoving()
incorrectly returns true inside mouseup
event handler
#9647
Comments
Thanks for the solid bug report @DannyDelott ! @ansis would you know whats causing this? |
@ansis is this related to #9365 (comment)? |
ansis
added a commit
that referenced
this issue
May 12, 2020
Previously isMoving() would return true if any interaction handler was active. Handlers are sometimes active even if they haven't changed the map yet. This resulted in the isMoving() returning true when the map hasn't moved. This makes isMoving aligned with movestart/move/moveend events. Since move events may be fired after several mouse events have been batched, the camera changes a mouseevent will *later* cause won't be reflected in isMoving() when that mouseevent is fired.
karimnaaji
pushed a commit
that referenced
this issue
May 14, 2020
* map.isMoving() match move events fix #9647 Previously isMoving() would return true if any interaction handler was active. Handlers are sometimes active even if they haven't changed the map yet. This resulted in the isMoving() returning true when the map hasn't moved. This makes isMoving aligned with movestart/move/moveend events. Since move events may be fired after several mouse events have been batched, the camera changes a mouseevent will *later* cause won't be reflected in isMoving() when that mouseevent is fired. * lint * fix test
karimnaaji
pushed a commit
that referenced
this issue
May 14, 2020
* map.isMoving() match move events fix #9647 Previously isMoving() would return true if any interaction handler was active. Handlers are sometimes active even if they haven't changed the map yet. This resulted in the isMoving() returning true when the map hasn't moved. This makes isMoving aligned with movestart/move/moveend events. Since move events may be fired after several mouse events have been batched, the camera changes a mouseevent will *later* cause won't be reflected in isMoving() when that mouseevent is fired. * lint * fix test
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
mapbox-gl-js version:
1.10.0
browser:
Chrome Version 81.0.4044.129 (Official Build) (64-bit)
It looks like there was a possible regression introduced in
mapbox-gl@1.10.0
that affects the result ofmap.isMoving()
inside themouseup
event handler.Steps to Trigger Behavior
mouseup
event handler on it.map.isMoving()
in the handler.Link to Demonstration
🐞
mapbox-gl@1.10.0
- https://codesandbox.io/s/magical-leavitt-6zhso✅
mapbox-gl@1.9.1
- https://codesandbox.io/s/lucid-hawking-ruywlExpected Behavior
Clicking on Maine should output
map.isMoving() === false
, ie:Actual Behavior
Clicking on Maine outputs
map.isMoving() === true
The text was updated successfully, but these errors were encountered: