From 3305aa2b0503410cbbcf89561895a435712da921 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20S=C3=A1nchez=20Ortega?= Date: Sun, 3 Apr 2016 03:16:11 +0200 Subject: [PATCH] Added leafdoc comments for the 'zoomanim' event, fixes #2862 --- src/core/Events.leafdoc | 6 +++++- src/map/anim/Map.ZoomAnimation.js | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/core/Events.leafdoc b/src/core/Events.leafdoc index 8494266b..d159b151 100644 --- a/src/core/Events.leafdoc +++ b/src/core/Events.leafdoc @@ -113,4 +113,8 @@ The popup that was opened or closed. @property distance: Number The distance in pixels the draggable element was moved by. - +@miniclass ZoomAnimEvent (Event ojects) +@inherits Event +@property center: LatLng; The current center of the map +@property zoom: Number; The current zoom level of the map +@property noUpdate: Boolean; Whether layers should update their contents due to this event diff --git a/src/map/anim/Map.ZoomAnimation.js b/src/map/anim/Map.ZoomAnimation.js index ae8af098..f6081e2b 100644 --- a/src/map/anim/Map.ZoomAnimation.js +++ b/src/map/anim/Map.ZoomAnimation.js @@ -107,6 +107,8 @@ L.Map.include(!zoomAnimated ? {} : { L.DomUtil.addClass(this._mapPane, 'leaflet-zoom-anim'); } + // @event zoomanim: ZoomAnimEvent + // Fired on every frame of a zoom animation this.fire('zoomanim', { center: center, zoom: zoom,