mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 08:02:41 +02:00
Fix up bounds recalculation, previously if you removed a marker the bounds wouldn't change
This commit is contained in:
@@ -316,18 +316,13 @@ L.MarkerCluster = L.Marker.extend({
|
||||
i;
|
||||
|
||||
this._bounds = new L.LatLngBounds();
|
||||
delete this._wLatLng;
|
||||
|
||||
for (i = markers.length - 1; i >= 0; i--) {
|
||||
this._bounds.extend(markers[i].getLatLng());
|
||||
this._expandBounds(markers[i]);
|
||||
}
|
||||
for (i = childClusters.length - 1; i >= 0; i--) {
|
||||
this._bounds.extend(childClusters[i]._bounds);
|
||||
}
|
||||
|
||||
if (this._childCount === 0) {
|
||||
delete this._latlng;
|
||||
} else {
|
||||
this.setLatLng(this._wLatLng);
|
||||
this._expandBounds(childClusters[i]);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user