mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-03 08:01:38 +02:00
#123 adding getVisibleParent for Marker
(cherry picked from commit da2952d57bdab7af998ab480200c38212cbc662e)
This commit is contained in:
@@ -390,6 +390,14 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
|
|||||||
this._map = null;
|
this._map = null;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getVisibleParent: function(marker){
|
||||||
|
var vMarker = marker;
|
||||||
|
// TODO: Is this safe? No extra check needed to prevent infinite loop?
|
||||||
|
while(!vMarker._icon) {
|
||||||
|
vMarker = vMarker.__parent;
|
||||||
|
}
|
||||||
|
return vMarker;
|
||||||
|
},
|
||||||
|
|
||||||
//Remove the given object from the given array
|
//Remove the given object from the given array
|
||||||
_arraySplice: function (anArray, obj) {
|
_arraySplice: function (anArray, obj) {
|
||||||
|
|||||||
Reference in New Issue
Block a user