Remove some redundant bits.

This commit is contained in:
danzel
2012-07-16 10:40:53 +12:00
parent 630d7ec0cd
commit 9211aba187
2 changed files with 2 additions and 6 deletions
-2
View File
@@ -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) {
+2 -4
View File
@@ -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