mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Click on id in debug panel highlights node or flow
This commit is contained in:
@@ -503,6 +503,16 @@ RED.utils = (function() {
|
||||
$('<span class="red-ui-debug-msg-type-string-swatch"></span>').css('backgroundColor',obj).appendTo(e);
|
||||
}
|
||||
|
||||
let n = RED.nodes.node(obj) ?? RED.nodes.workspace(obj);
|
||||
if (n) {
|
||||
if (options.node_selector && "function" == typeof options.node_selector) {
|
||||
e.css('cursor', 'pointer').on("click", function(evt) {
|
||||
evt.preventDefault();
|
||||
options.node_selector(n.id);
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
} else if (typeof obj === 'number') {
|
||||
e = $('<span class="red-ui-debug-msg-type-number"></span>').appendTo(entryObj);
|
||||
|
||||
@@ -609,6 +619,7 @@ RED.utils = (function() {
|
||||
exposeApi: exposeApi,
|
||||
// tools: tools // Do not pass tools down as we
|
||||
// keep them attached to the top-level header
|
||||
node_selector: options.node_selector,
|
||||
}
|
||||
).appendTo(row);
|
||||
}
|
||||
@@ -639,6 +650,7 @@ RED.utils = (function() {
|
||||
exposeApi: exposeApi,
|
||||
// tools: tools // Do not pass tools down as we
|
||||
// keep them attached to the top-level header
|
||||
node_selector: options.node_selector,
|
||||
}
|
||||
).appendTo(row);
|
||||
}
|
||||
@@ -695,6 +707,7 @@ RED.utils = (function() {
|
||||
exposeApi: exposeApi,
|
||||
// tools: tools // Do not pass tools down as we
|
||||
// keep them attached to the top-level header
|
||||
node_selector: options.node_selector,
|
||||
}
|
||||
).appendTo(row);
|
||||
}
|
||||
|
Reference in New Issue
Block a user