mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-03 00:11:49 +02:00
Handle zooming to the same zoom level you are already on (touchzoom on iOS can cause this)
This commit is contained in:
@@ -143,7 +143,6 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_zoomEnd: function () {
|
_zoomEnd: function () {
|
||||||
this._animationStart();
|
|
||||||
|
|
||||||
this._mergeSplitClusters();
|
this._mergeSplitClusters();
|
||||||
|
|
||||||
@@ -190,14 +189,18 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
|
|||||||
_mergeSplitClusters: function () {
|
_mergeSplitClusters: function () {
|
||||||
|
|
||||||
if (this._zoom < this._map._zoom) { //Zoom in, split
|
if (this._zoom < this._map._zoom) { //Zoom in, split
|
||||||
|
this._animationStart();
|
||||||
//Remove clusters now off screen
|
//Remove clusters now off screen
|
||||||
this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds, this._zoom - this._topClusterLevel._zoom, this._getExpandedVisibleBounds());
|
this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds, this._zoom - this._topClusterLevel._zoom, this._getExpandedVisibleBounds());
|
||||||
|
|
||||||
this._animationZoomIn(this._zoom, this._map._zoom);
|
this._animationZoomIn(this._zoom, this._map._zoom);
|
||||||
|
|
||||||
} else if (this._zoom > this._map._zoom) { //Zoom out, merge
|
} else if (this._zoom > this._map._zoom) { //Zoom out, merge
|
||||||
|
this._animationStart();
|
||||||
|
|
||||||
this._animationZoomOut(this._zoom, this._map._zoom);
|
this._animationZoomOut(this._zoom, this._map._zoom);
|
||||||
|
} else {
|
||||||
|
this._moveEnd();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user