Don't re-spiderfy if the same cluster is clicked twice

This commit is contained in:
danzel
2012-07-24 09:18:30 +12:00
parent ab5714fe9d
commit 813d38a09a
+5 -2
View File
@@ -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),