mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 00:24:21 +02:00
Work around browsers without zoomAnimation not firing zoomstart. Makes spiderfied packs disappear on zoomout
This commit is contained in:
@@ -309,7 +309,13 @@ L.MarkerClusterGroup.include({
|
||||
|
||||
_spiderfierOnAdd: function () {
|
||||
this._map.on('click', this._unspiderfyWrapper, this);
|
||||
this._map.on('zoomstart', this._unspiderfyZoomStart, this);
|
||||
|
||||
if (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);
|
||||
}
|
||||
|
||||
if (L.Browser.svg && !L.Browser.touch) {
|
||||
this._map._initPathRoot();
|
||||
|
||||
Reference in New Issue
Block a user