mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-27 08:02:51 +02:00
This commit is contained in:
@@ -60,6 +60,9 @@
|
||||
expect(marker2._container.parentNode).to.be(map._pathRoot);
|
||||
|
||||
clock.tick(1000);
|
||||
|
||||
expect(marker._container.parentNode).to.be(null);
|
||||
expect(marker2._container.parentNode).to.be(null);
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -210,7 +210,9 @@ L.MarkerCluster = L.Marker.extend({
|
||||
nm._backupLatlng = nm.getLatLng();
|
||||
|
||||
nm.setLatLng(startPos);
|
||||
nm.setOpacity(0);
|
||||
if (nm.setOpacity) {
|
||||
nm.setOpacity(0);
|
||||
}
|
||||
}
|
||||
|
||||
nm._noHas = true;
|
||||
@@ -263,7 +265,9 @@ L.MarkerCluster = L.Marker.extend({
|
||||
m = c._markers[i];
|
||||
if (!exceptBounds || !exceptBounds.contains(m._latlng)) {
|
||||
L.FeatureGroup.prototype.removeLayer.call(c._group, m);
|
||||
m.setOpacity(1);
|
||||
if (m.setOpacity) {
|
||||
m.setOpacity(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -275,7 +279,9 @@ L.MarkerCluster = L.Marker.extend({
|
||||
if (!L.FeatureGroup.prototype.hasLayer || L.FeatureGroup.prototype.hasLayer.call(c._group, m)) {
|
||||
L.FeatureGroup.prototype.removeLayer.call(c._group, m);
|
||||
}
|
||||
m.setOpacity(1);
|
||||
if (m.setOpacity) {
|
||||
m.setOpacity(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,9 +113,11 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
|
||||
//Remove the marker from clusters
|
||||
this._removeLayer(layer, true);
|
||||
|
||||
if (layer._icon) {
|
||||
if (layer._icon || layer._container) {
|
||||
L.FeatureGroup.prototype.removeLayer.call(this, layer);
|
||||
layer.setOpacity(1);
|
||||
if (layer.setOpacity) {
|
||||
layer.setOpacity(1);
|
||||
}
|
||||
}
|
||||
|
||||
return this;
|
||||
|
||||
Reference in New Issue
Block a user