[Pkg-javascript-commits] [leaflet-markercluster] 330/479: Fix not firing animationEnd when we have only one marker in the markerClusterGroup. Fixes #146

Jonas Smedegaard dr at jones.dk
Thu Oct 16 16:00:48 UTC 2014


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository leaflet-markercluster.

commit 828bb3e2d6f31cf8cea4eb801de8dc1a54f28cff
Author: danzel <danzel at localhost.geek.nz>
Date:   Tue Apr 2 09:27:39 2013 +1300

    Fix not firing animationEnd when we have only one marker in the markerClusterGroup. Fixes #146
---
 src/MarkerClusterGroup.js | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/MarkerClusterGroup.js b/src/MarkerClusterGroup.js
index b7c3d96..2888457 100644
--- a/src/MarkerClusterGroup.js
+++ b/src/MarkerClusterGroup.js
@@ -842,13 +842,11 @@ L.MarkerClusterGroup.include(!L.DomUtil.TRANSITION ? {
 				//If we were in a cluster animation at the time then the opacity and position of our child could be wrong now, so fix it
 				m.setLatLng(m.getLatLng());
 				m.setOpacity(1);
-
-				return;
+			} else {
+				cluster._recursively(bounds, newZoomLevel, 0, function(c) {
+					c._recursivelyRemoveChildrenFromMap(bounds, previousZoomLevel + 1);
+				});
 			}
-
-			cluster._recursively(bounds, newZoomLevel, 0, function (c) {
-				c._recursivelyRemoveChildrenFromMap(bounds, previousZoomLevel + 1);
-			});
 			me._animationEnd();
 		}, 200);
 	},

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/leaflet-markercluster.git



More information about the Pkg-javascript-commits mailing list