mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-01 16:26:55 +02: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;
|
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) {
|
if (legendOptions.hideElemsOnClick.enabled) {
|
||||||
// Hide/show elements when user clicks on a legend element
|
// Hide/show elements when user clicks on a legend element
|
||||||
label.attr({cursor:"pointer"});
|
label.attr({cursor:"pointer"});
|
||||||
|
|||||||
Reference in New Issue
Block a user