[Pkg-javascript-commits] [leaflet-markercluster] 134/479: Update the build

Jonas Smedegaard dr at jones.dk
Thu Oct 16 16:00:20 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 94e3d4f6dde076e887a29576804b3ece5a526d48
Author: danzel <danzel at localhost.geek.nz>
Date:   Mon Jul 30 11:59:18 2012 +1200

    Update the build
---
 dist/leaflet.markercluster-src.js | 20 +++++++++++++++++++-
 dist/leaflet.markercluster.js     |  2 +-
 2 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/dist/leaflet.markercluster-src.js b/dist/leaflet.markercluster-src.js
index c42f7b7..23f187a 100644
--- a/dist/leaflet.markercluster-src.js
+++ b/dist/leaflet.markercluster-src.js
@@ -74,7 +74,9 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
 	onAdd: function (map) {
 		L.FeatureGroup.prototype.onAdd.call(this, map);
 
-		this._generateInitialClusters();
+		if (!this._topClusterLevel) {
+			this._generateInitialClusters();
+		}
 		this._map.on('zoomend', this._zoomEnd, this);
 		this._map.on('moveend', this._moveEnd, this);
 
@@ -85,6 +87,18 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
 		this._bindEvents();
 	},
 
+	//Overrides FeatureGroup.onRemove
+	onRemove: function (map) {
+		this._map.off('zoomend', this._zoomEnd, this);
+		this._map.off('moveend', this._moveEnd, this);
+
+		if (this._spiderfierOnRemove) { //TODO FIXME: Not sure how to have spiderfier add something on here nicely
+			this._spiderfierOnRemove();
+		}
+
+		L.FeatureGroup.prototype.onRemove.call(this, map);
+	},
+
 	//Overrides FeatureGroup._propagateEvent
 	_propagateEvent: function (e) {
 		if (e.target instanceof L.MarkerCluster) {
@@ -1383,6 +1397,10 @@ L.MarkerClusterGroup.include({
 		}
 	},
 
+	_spiderfierOnRemove: function () {
+		this._map.off('click zoomstart', this._unspiderfy, this);
+	},
+
 	_unspiderfy: function () {
 		if (this._spiderfied) {
 			this._spiderfied.unspiderfy();
diff --git a/dist/leaflet.markercluster.js b/dist/leaflet.markercluster.js
index f5b23bb..5583aea 100644
--- a/dist/leaflet.markercluster.js
+++ b/dist/leaflet.markercluster.js
@@ -3,4 +3,4 @@
  Leaflet.markercluster is an open-source JavaScript library for Marker Clustering on leaflet powered maps.
  https://github.com/danzel/Leaflet.markercluster
 */
-(function(e,t){L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:60,iconCreateFunction:null,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0},initialize:function(e){L.Util.setOptions(this,e),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),L.FeatureGroup.prototype.initialize.call(this,[]),this._inZoomAnimation=0,this._needsClustering=[],this._currentShownBounds=null},addLayer:function(e){if(!this._map [...]
\ No newline at end of file
+(function(e,t){L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:60,iconCreateFunction:null,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0},initialize:function(e){L.Util.setOptions(this,e),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),L.FeatureGroup.prototype.initialize.call(this,[]),this._inZoomAnimation=0,this._needsClustering=[],this._currentShownBounds=null},addLayer:function(e){if(!this._map [...]
\ No newline at end of file

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