mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-27 08:02:51 +02:00
Update build
This commit is contained in:
Vendored
+25
-5
@@ -1035,9 +1035,28 @@ L.MarkerCluster = L.Marker.extend({
|
||||
return this._childCount;
|
||||
},
|
||||
|
||||
//Zoom to the extents of this cluster
|
||||
//Zoom to the minimum of showing all of the child markers, or the extents of this cluster
|
||||
zoomToBounds: function () {
|
||||
this._group._map.fitBounds(this._bounds);
|
||||
var childClusters = this._childClusters.slice(),
|
||||
map = this._group._map,
|
||||
boundsZoom = map.getBoundsZoom(this._bounds),
|
||||
zoom = this._zoom + 1,
|
||||
i;
|
||||
|
||||
while (childClusters.length > 0 && boundsZoom > zoom) {
|
||||
zoom++;
|
||||
var newClusters = [];
|
||||
for (i = 0; i < childClusters.length; i++) {
|
||||
newClusters = newClusters.concat(childClusters[i]._childClusters);
|
||||
}
|
||||
childClusters = newClusters;
|
||||
}
|
||||
|
||||
if (boundsZoom > zoom) {
|
||||
this._group._map.setView(this._latlng, zoom);
|
||||
} else {
|
||||
this._group._map.fitBounds(this._bounds);
|
||||
}
|
||||
},
|
||||
|
||||
getBounds: function () {
|
||||
@@ -1717,6 +1736,8 @@ L.MarkerCluster.include({
|
||||
delete m._spiderLeg;
|
||||
}
|
||||
}
|
||||
|
||||
group._spiderfied = null;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1959,10 +1980,9 @@ L.MarkerClusterGroup.include({
|
||||
|
||||
if (this._map.options.zoomAnimation) {
|
||||
this._map.on('zoomstart', this._unspiderfyZoomStart, this);
|
||||
} else {
|
||||
//Browsers without zoomAnimation don't fire zoomstart
|
||||
this._map.on('zoomend', this._unspiderfyWrapper, this);
|
||||
}
|
||||
//Browsers without zoomAnimation or a big zoom don't fire zoomstart
|
||||
this._map.on('zoomend', this._noanimationUnspiderfy, this);
|
||||
|
||||
if (L.Path.SVG && !L.Browser.touch) {
|
||||
this._map._initPathRoot();
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user