mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-30 16:14:21 +02:00
Fix up adding just 1 marker. Fixes #60
This commit is contained in:
@@ -185,7 +185,7 @@ L.MarkerCluster = L.Marker.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_recursivelyAddChildrenToMap: function (startPos, zoomLevel, bounds) {
|
_recursivelyAddChildrenToMap: function (startPos, zoomLevel, bounds) {
|
||||||
this._recursively(bounds, 0, zoomLevel,
|
this._recursively(bounds, -1, zoomLevel,
|
||||||
function (c) {
|
function (c) {
|
||||||
if (zoomLevel === c._zoom) {
|
if (zoomLevel === c._zoom) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -476,6 +476,9 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
|
|||||||
gridUnclustered[zoom].addObject(layer, markerPoint);
|
gridUnclustered[zoom].addObject(layer, markerPoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Didn't get in anything, add us to the top
|
||||||
|
this._topClusterLevel._addChild(layer);
|
||||||
|
layer.__parent = this._topClusterLevel;
|
||||||
return;
|
return;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user