mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 00:24:21 +02:00
Fire animationend event even in non-animated versions of the zoom in/out animation. Makes oldie fire the same events as modern browsers. Fixes #310
This commit is contained in:
@@ -898,10 +898,16 @@ L.MarkerClusterGroup.include(!L.DomUtil.TRANSITION ? {
|
||||
_animationZoomIn: function (previousZoomLevel, newZoomLevel) {
|
||||
this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds, previousZoomLevel);
|
||||
this._topClusterLevel._recursivelyAddChildrenToMap(null, newZoomLevel, this._getExpandedVisibleBounds());
|
||||
|
||||
//We didn't actually animate, but we use this event to mean "clustering animations have finished"
|
||||
this.fire('animationend');
|
||||
},
|
||||
_animationZoomOut: function (previousZoomLevel, newZoomLevel) {
|
||||
this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds, previousZoomLevel);
|
||||
this._topClusterLevel._recursivelyAddChildrenToMap(null, newZoomLevel, this._getExpandedVisibleBounds());
|
||||
|
||||
//We didn't actually animate, but we use this event to mean "clustering animations have finished"
|
||||
this.fire('animationend');
|
||||
},
|
||||
_animationAddLayer: function (layer, newCluster) {
|
||||
this._animationAddLayerNonAnimated(layer, newCluster);
|
||||
|
||||
Reference in New Issue
Block a user