[Pkg-javascript-commits] [leaflet-markercluster] 80/479: Don't re-spiderfy if the same cluster is clicked twice

Jonas Smedegaard dr at jones.dk
Thu Oct 16 16:00:12 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 813d38a09a9c34b845821996879bca4162c41cdc
Author: danzel <danzel at localhost.geek.nz>
Date:   Tue Jul 24 09:18:30 2012 +1200

    Don't re-spiderfy if the same cluster is clicked twice
---
 src/MarkerCluster.Spiderfier.js | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/MarkerCluster.Spiderfier.js b/src/MarkerCluster.Spiderfier.js
index 2079579..39d386a 100644
--- a/src/MarkerCluster.Spiderfier.js
+++ b/src/MarkerCluster.Spiderfier.js
@@ -15,8 +15,11 @@ L.MarkerCluster.include({
 								// 0 -> always spiral; Infinity -> always circle
 
 	spiderfy: function () {
-		var me = this,
-			childMarkers = this.getAllChildMarkers(),
+		if (this._group._spiderfied == this) {
+			return;
+		}
+
+		var childMarkers = this.getAllChildMarkers(),
 			group = this._group,
 			map = group._map,
 			center = map.latLngToLayerPoint(this._latlng),

-- 
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