Mapbox-gl-js: When scrolling with the Apple Magic mouse, Map#isMoving() always returns false

Created on 25 Apr 2018  ·  6Comments  ·  Source: mapbox/mapbox-gl-js

mapbox-gl-js version:

  • v0.44.2 or later

Steps to Trigger Behavior

When call map.isMoving() during zoomIn or zoomOut, the result is always false.

  1. Open the chrome browser console.
  2. Enter the code below.
    javascript setInterval(() => { console.log(map.isMoving()); });
  3. Zoom in or zoom out using the Apple Magic Mouse wheel. 🍎
  4. The result is always false.

Expected Behavior

true 

Actual Behavior

false 

But seems It works well in v0.44.1.

bug

Most helpful comment

0.44.2 doesn't include c0158855ddfa34f4706c5190e6d3da3972e1b901:

image

All 6 comments

Also, the mapbox version in the examples on the Mapbox website seesm to be wrong.
The Mapbox website uses v0.44.2, but cannot use Map.isZooming() (added in https://github.com/mapbox/mapbox-gl-js/commit/c0158855ddfa34f4706c5190e6d3da3972e1b901)

0.44.2 doesn't include c0158855ddfa34f4706c5190e6d3da3972e1b901:

image

When scrolling with the Apple Magic mouse map#isMoving result always false 🆘

@jfirebaugh
I wonder if this is a bug..
I want to know the status when I zoom in with the Apple Magic mouse or trackpad. Is there a way? 😞

This has been fixed by https://github.com/mapbox/mapbox-gl-js/pull/9365. If you have a chance to test and confirm, that would be great! The fix is in master and will be released in a beta release tomorrow.

@ansis Thank you for not forgetting to fix :D

Was this page helpful?
0 / 5 - 0 ratings