[Pkg-javascript-commits] [leaflet-markercluster] 21/479: Remove some redundant bits.

Jonas Smedegaard dr at jones.dk
Thu Oct 16 16:00:04 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 9211aba187d33ba379e66480cd1229fdea229204
Author: danzel <danzel at localhost.geek.nz>
Date:   Mon Jul 16 10:40:53 2012 +1200

    Remove some redundant bits.
---
 src/MarkerCluster.js      | 2 --
 src/MarkerClusterGroup.js | 6 ++----
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/MarkerCluster.js b/src/MarkerCluster.js
index 8c13f2e..b79e739 100644
--- a/src/MarkerCluster.js
+++ b/src/MarkerCluster.js
@@ -74,7 +74,6 @@ L.MarkerCluster = L.Marker.extend({
 	_recursivelyRemoveChildMarker: function(layer) {
 		var markers = this._markers,
 			childClusters = this._childClusters,
-			newChildCount = 0,
 			i;
 
 		//Check our children
@@ -95,7 +94,6 @@ L.MarkerCluster = L.Marker.extend({
 		for (i = childClusters.length - 1; i >= 0; i--) {
 			if (childClusters[i]._recursivelyRemoveChildMarker(layer)) {
 				this._childCount--;
-				//TODO: If child is now 1 then remove it and add a marker
 				//TODO? Recalculate bounds
 
 				if (this._icon) {
diff --git a/src/MarkerClusterGroup.js b/src/MarkerClusterGroup.js
index 29cfca6..91fd1d4 100644
--- a/src/MarkerClusterGroup.js
+++ b/src/MarkerClusterGroup.js
@@ -107,8 +107,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
 
 	//Merge and split any existing clusters that are too big or small
 	_mergeSplitClusters: function () {
-		var map = this._map,
-		    newState,
+		var newState,
 		    depth = Math.abs(this._map._zoom - this._zoom);
 
 		if (this._zoom < this._map._zoom) { //Zoom in, split
@@ -216,7 +215,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
 	removeLayer: function (layer) {
 		var current = this._markersAndClustersAtZoom[this._map._zoom],
 			i = current.unclustered.indexOf(layer),
-			cluster, result, killParents = false;
+			killParents = false;
 
 		//TODO: This whole thing could probably be better
 
@@ -276,7 +275,6 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
 		var clusterRadiusSqrd = this.options.maxClusterRadius * this.options.maxClusterRadius,
 		    clusters = existingClusters,
 		    unclustered = existingUnclustered,
-		    center = this._map.getCenter(),
 		    i, j, c;
 
 		//Calculate pixel positions

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