gregallensworth/L.Control.BoxZoom

zoomAnim Event

Closed this issue · 2 comments

The zoomAnim event is not being fired after the map has loaded, and an area is being zoomed to using leaflet-control-boxzoom...

Even if an area is scroll-zoomed to, then BoxZoomed, the zoomAnim event is not fired for the BoxZoom zoom, the first time it is used.

I am seeing the map's zoomanim event being fired. Can you please describe this in more detail, including what Leaflet version you're using and how you are watching for the event?

My testing mechanism:

  • Leaflet 0.7.7 and the index.html from the demo.
  • Added an event catcher like this:
map.on('zoomanim', function () {
    console.log('received zoomanim event');
});
  • Confirmed seeing the zoomanim events happening in console.

This control calls the map's own boxZoom() method, which itself handles the animations and events.

This issue pops up on the first use of using the boxzoom tool. I have the same code as you, for firing events when the 'zoomanim' happens... and it only fires on subsequent uses of this tool.

Leaflet 0.7.7 and 1.0.3