From 6b0e08b5342ee8edfbe111b18f60e40b572935b0 Mon Sep 17 00:00:00 2001 From: danzel Date: Thu, 19 Jul 2012 10:35:13 +1200 Subject: [PATCH] Fix animated multi zoom out --- src/MarkerClusterGroup.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/MarkerClusterGroup.js b/src/MarkerClusterGroup.js index 28ecbbd93..910db6d1f 100644 --- a/src/MarkerClusterGroup.js +++ b/src/MarkerClusterGroup.js @@ -417,8 +417,7 @@ L.MarkerClusterGroup.include(!L.DomUtil.TRANSITION ? { _animationZoomOut: function (previousZoomLevel, newZoomLevel) { var map = this._map, bounds = this._getExpandedVisibleBounds(), - i, - depthToStartAt = previousZoomLevel - this._topClusterLevel._zoom, + depthToStartAt = 1 + newZoomLevel - this._topClusterLevel._zoom, depthToAnimateIn = previousZoomLevel - newZoomLevel; console.log('animationZoomOut ' + depthToStartAt + ' ' + depthToAnimateIn);