mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 08:02:41 +02:00
Update the build
This commit is contained in:
Vendored
+19
-5
@@ -38,6 +38,17 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
|
||||
},
|
||||
|
||||
addLayer: function (layer) {
|
||||
|
||||
if (layer instanceof L.LayerGroup)
|
||||
{
|
||||
for (var i in layer._layers) {
|
||||
if (layer._layers.hasOwnProperty(i)) {
|
||||
this.addLayer(layer._layers[i]);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
if (!this._map) {
|
||||
this._needsClustering.push(layer);
|
||||
return this;
|
||||
@@ -1126,7 +1137,9 @@ L.DistanceGrid.prototype = {
|
||||
getNearObject: function (point) {
|
||||
var x = this._getCoord(point.x),
|
||||
y = this._getCoord(point.y),
|
||||
i, j, k, row, cell, len, obj;
|
||||
i, j, k, row, cell, len, obj, dist,
|
||||
closestDistSq = this._sqCellSize,
|
||||
closest = null;
|
||||
|
||||
for (i = y - 1; i <= y + 1; i++) {
|
||||
row = this._grid[i];
|
||||
@@ -1138,16 +1151,17 @@ L.DistanceGrid.prototype = {
|
||||
|
||||
for (k = 0, len = cell.length; k < len; k++) {
|
||||
obj = cell[k];
|
||||
if (this._sqDist(obj._dGridPoint, point) < this._sqCellSize) {
|
||||
return obj;
|
||||
dist = this._sqDist(obj._dGridPoint, point);
|
||||
if (dist < closestDistSq) {
|
||||
closestDistSq = dist;
|
||||
closest = obj;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
return closest;
|
||||
},
|
||||
|
||||
_getCoord: function (x) {
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user