From 5b5d0a9a6cf060adf92e212dd94e30ab00eaf2b4 Mon Sep 17 00:00:00 2001 From: danzel Date: Wed, 1 Aug 2012 15:17:32 +1200 Subject: [PATCH] Partially fix the animation when a marker is added to an existing cluster. --- src/MarkerClusterGroup.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MarkerClusterGroup.js b/src/MarkerClusterGroup.js index 30886d95d..65ed7cbaa 100644 --- a/src/MarkerClusterGroup.js +++ b/src/MarkerClusterGroup.js @@ -490,7 +490,7 @@ L.MarkerClusterGroup.include(!L.DomUtil.TRANSITION ? { this._forceLayout(); this._animationStart(); - layer._setPos(this._map.latLngToLayerPoint(layer.getLatLng())); + layer._setPos(this._map.latLngToLayerPoint(newCluster.getLatLng())); layer.setOpacity(0); setTimeout(function () {