[Pkg-javascript-commits] [leaflet-markercluster] 220/479: bit more dead code

Jonas Smedegaard dr at jones.dk
Thu Oct 16 16:00:33 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 6235c283f221d9b05e3a0124f8e06aac7646da22
Author: danzel <danzel at localhost.geek.nz>
Date:   Tue Sep 11 15:25:53 2012 +1200

    bit more dead code
---
 src/MarkerCluster.js      | 16 +++-------------
 src/MarkerClusterGroup.js |  3 ---
 2 files changed, 3 insertions(+), 16 deletions(-)

diff --git a/src/MarkerCluster.js b/src/MarkerCluster.js
index 6485cb6..622251f 100644
--- a/src/MarkerCluster.js
+++ b/src/MarkerCluster.js
@@ -47,6 +47,7 @@ L.MarkerCluster = L.Marker.extend({
 		this._group._map.fitBounds(this._bounds);
 	},
 
+
 	_updateIcon: function () {
 		this._iconNeedsUpdate = true;
 		if (this._icon) {
@@ -54,7 +55,7 @@ L.MarkerCluster = L.Marker.extend({
 		}
 	},
 
-	//Cludge for Icon
+	//Cludge for Icon, we pretend to be an icon for performance
 	createIcon: function () {
 		if (this._iconNeedsUpdate) {
 			this._iconObj = this._group.options.iconCreateFunction(this);
@@ -66,6 +67,7 @@ L.MarkerCluster = L.Marker.extend({
 		return this._iconObj.createShadow();
 	},
 
+
 	_addChild: function (new1, isNotificationFromChild) {
 
 		this._iconNeedsUpdate = true;
@@ -127,18 +129,6 @@ L.MarkerCluster = L.Marker.extend({
 		}
 		L.FeatureGroup.prototype.addLayer.call(this._group, this);
 	},
-
-	_canAcceptPosition: function (latlng, zoom) {
-		if (this._childCount === 0) {
-			return true;
-		}
-
-		var clusterRadiusSqrd = this._group.options.maxClusterRadius * this._group.options.maxClusterRadius,
-			pos = this._group._map.project(this._cLatLng, zoom),
-			otherpos = this._group._map.project(latlng, zoom);
-
-		return (this._group._sqDist(pos, otherpos) <= clusterRadiusSqrd);
-	},
 	
 	_recursivelyAnimateChildrenIn: function (bounds, center, depth) {
 		this._recursively(bounds, 0, depth - 1,
diff --git a/src/MarkerClusterGroup.js b/src/MarkerClusterGroup.js
index b6e7795..0282d4e 100644
--- a/src/MarkerClusterGroup.js
+++ b/src/MarkerClusterGroup.js
@@ -85,8 +85,6 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
 			}
 		}
 
-		//TODO: Find the highest visible blah
-
 		if (this.options.animateAddingMarkers) {
 			this._animationAddLayer(layer, visibleLayer);
 		} else {
@@ -488,7 +486,6 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
 		} else {
 			newCluster._updateIcon();
 		}
-		//TODO else update icon?
 	}
 });
 

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