1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Ctrl-dbclick on subflow node opens subflow tab

This commit is contained in:
Nick O'Leary 2021-03-06 23:21:16 +00:00
parent 5181890433
commit 2d4f5b8603
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -2809,7 +2809,11 @@ RED.view = (function() {
if (dblClickPrimed && mousedown_node == d && clickElapsed > 0 && clickElapsed < dblClickInterval) { if (dblClickPrimed && mousedown_node == d && clickElapsed > 0 && clickElapsed < dblClickInterval) {
mouse_mode = RED.state.DEFAULT; mouse_mode = RED.state.DEFAULT;
if (d.type != "subflow") { if (d.type != "subflow") {
RED.editor.edit(d); if (/^subflow:/.test(d.type) && (d3.event.ctrlKey || d3.event.metaKey)) {
RED.workspaces.show(d.type.substring(8));
} else {
RED.editor.edit(d);
}
} else { } else {
RED.editor.editSubflow(activeSubflow); RED.editor.editSubflow(activeSubflow);
} }
@ -2952,7 +2956,7 @@ RED.view = (function() {
clickTime = now; clickTime = now;
dblClickPrimed = (lastClickNode == mousedown_node && dblClickPrimed = (lastClickNode == mousedown_node &&
(d3.event.touches || d3.event.button === 0) && (d3.event.touches || d3.event.button === 0) &&
!d3.event.shiftKey && !d3.event.metaKey && !d3.event.altKey && !d3.event.ctrlKey && !d3.event.shiftKey && !d3.event.altKey &&
clickElapsed < dblClickInterval clickElapsed < dblClickInterval
) )
lastClickNode = mousedown_node; lastClickNode = mousedown_node;