mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Merge pull request #4439 from ralphwetzel/dev_link
Click on id in debug panel highlights node or flow
This commit is contained in:
commit
1261d26b23
@ -483,6 +483,16 @@ RED.utils = (function() {
|
|||||||
$('<span class="red-ui-debug-msg-type-string-swatch"></span>').css('backgroundColor',obj).appendTo(e);
|
$('<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.nodeSelector && "function" == typeof options.nodeSelector) {
|
||||||
|
e.css('cursor', 'pointer').on("click", function(evt) {
|
||||||
|
evt.preventDefault();
|
||||||
|
options.nodeSelector(n.id);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} else if (typeof obj === 'number') {
|
} else if (typeof obj === 'number') {
|
||||||
e = $('<span class="red-ui-debug-msg-type-number"></span>').appendTo(entryObj);
|
e = $('<span class="red-ui-debug-msg-type-number"></span>').appendTo(entryObj);
|
||||||
|
|
||||||
@ -589,6 +599,7 @@ RED.utils = (function() {
|
|||||||
exposeApi: exposeApi,
|
exposeApi: exposeApi,
|
||||||
// tools: tools // Do not pass tools down as we
|
// tools: tools // Do not pass tools down as we
|
||||||
// keep them attached to the top-level header
|
// keep them attached to the top-level header
|
||||||
|
nodeSelector: options.nodeSelector,
|
||||||
}
|
}
|
||||||
).appendTo(row);
|
).appendTo(row);
|
||||||
}
|
}
|
||||||
@ -619,6 +630,7 @@ RED.utils = (function() {
|
|||||||
exposeApi: exposeApi,
|
exposeApi: exposeApi,
|
||||||
// tools: tools // Do not pass tools down as we
|
// tools: tools // Do not pass tools down as we
|
||||||
// keep them attached to the top-level header
|
// keep them attached to the top-level header
|
||||||
|
nodeSelector: options.nodeSelector,
|
||||||
}
|
}
|
||||||
).appendTo(row);
|
).appendTo(row);
|
||||||
}
|
}
|
||||||
@ -675,6 +687,7 @@ RED.utils = (function() {
|
|||||||
exposeApi: exposeApi,
|
exposeApi: exposeApi,
|
||||||
// tools: tools // Do not pass tools down as we
|
// tools: tools // Do not pass tools down as we
|
||||||
// keep them attached to the top-level header
|
// keep them attached to the top-level header
|
||||||
|
nodeSelector: options.nodeSelector,
|
||||||
}
|
}
|
||||||
).appendTo(row);
|
).appendTo(row);
|
||||||
}
|
}
|
||||||
|
@ -512,7 +512,8 @@ RED.debug = (function() {
|
|||||||
hideKey: false,
|
hideKey: false,
|
||||||
path: path,
|
path: path,
|
||||||
sourceId: sourceNode&&sourceNode.id,
|
sourceId: sourceNode&&sourceNode.id,
|
||||||
rootPath: path
|
rootPath: path,
|
||||||
|
nodeSelector: config.messageSourceClick,
|
||||||
});
|
});
|
||||||
// Do this in a separate step so the element functions aren't stripped
|
// Do this in a separate step so the element functions aren't stripped
|
||||||
debugMessage.appendTo(el);
|
debugMessage.appendTo(el);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user