mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Added data attributes that allow to easily select legend elements and labels through jQuery
This commit is contained in:
@ -654,6 +654,9 @@
|
||||
height += legendOptions.marginBottom + elemBBox.height;
|
||||
}
|
||||
|
||||
$(elem.node).attr({"data-type": "elem", "data-index": i});
|
||||
$(label.node).attr({"data-type": "label", "data-index": i});
|
||||
|
||||
if (legendOptions.hideElemsOnClick.enabled) {
|
||||
// Hide/show elements when user clicks on a legend element
|
||||
label.attr({cursor:"pointer"});
|
||||
|
Reference in New Issue
Block a user