From 51720f071b63bed917ea228f575cb7ec3bb7b73f Mon Sep 17 00:00:00 2001 From: danzel Date: Thu, 13 Sep 2012 11:07:56 +1200 Subject: [PATCH] Fix up the non animated versions too --- src/MarkerClusterGroup.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MarkerClusterGroup.js b/src/MarkerClusterGroup.js index 2e94aeb4f..e63fb445e 100644 --- a/src/MarkerClusterGroup.js +++ b/src/MarkerClusterGroup.js @@ -535,11 +535,11 @@ L.MarkerClusterGroup.include(!L.DomUtil.TRANSITION ? { //Do nothing... }, _animationZoomIn: function (previousZoomLevel, newZoomLevel) { - this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds, previousZoomLevel); + this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds, previousZoomLevel - 1); this._topClusterLevel._recursivelyAddChildrenToMap(null, newZoomLevel, this._getExpandedVisibleBounds()); }, _animationZoomOut: function (previousZoomLevel, newZoomLevel) { - this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds, previousZoomLevel); + this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds, previousZoomLevel - 1); this._topClusterLevel._recursivelyAddChildrenToMap(null, newZoomLevel, this._getExpandedVisibleBounds()); }, _animationAddLayer: function (layer, newCluster) {