mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-26 00:18:03 +02:00
Fix removeLayer updating count on icon
This commit is contained in:
@@ -182,7 +182,7 @@ L.MarkerCluster = L.Marker.extend({
|
||||
this._recalculateBounds();
|
||||
|
||||
this._childCount--;
|
||||
if (this._icon) {
|
||||
if (!('_zoom' in this)) {
|
||||
this.setIcon(group.options.iconCreateFunction(this._childCount));
|
||||
}
|
||||
return true;
|
||||
@@ -195,6 +195,9 @@ L.MarkerCluster = L.Marker.extend({
|
||||
|
||||
if (child._bounds.contains(layer._latlng) && child._recursivelyRemoveLayer(layer)) {
|
||||
this._childCount--;
|
||||
if (!('_zoom' in this)) {
|
||||
this.setIcon(group.options.iconCreateFunction(this._childCount));
|
||||
}
|
||||
|
||||
//if our child cluster is no longer a cluster, remove it and replace with just the marker
|
||||
if (child._childCount === 1) {
|
||||
|
||||
Reference in New Issue
Block a user