mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-27 08:02:51 +02:00
Remove some redundant bits.
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user