mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Add core:go-to-selected-subflow action
This commit is contained in:
parent
2d4f5b8603
commit
9c7db1381c
@ -38,6 +38,7 @@
|
||||
"backspace": "core:delete-selection",
|
||||
"delete": "core:delete-selection",
|
||||
"enter": "core:edit-selected-node",
|
||||
"ctrl-enter": "core:go-to-selected-subflow",
|
||||
"ctrl-c": "core:copy-selection-to-internal-clipboard",
|
||||
"ctrl-x": "core:cut-selection-to-internal-clipboard",
|
||||
"ctrl-v": "core:paste-from-internal-clipboard",
|
||||
|
@ -503,6 +503,7 @@ RED.view = (function() {
|
||||
RED.actions.add("core:paste-from-internal-clipboard",function(){importNodes(clipboard,{generateIds: true});});
|
||||
RED.actions.add("core:delete-selection",deleteSelection);
|
||||
RED.actions.add("core:edit-selected-node",editSelection);
|
||||
RED.actions.add("core:go-to-selected-subflow",editSelectedSubflow);
|
||||
RED.actions.add("core:undo",RED.history.pop);
|
||||
RED.actions.add("core:redo",RED.history.redo);
|
||||
RED.actions.add("core:select-all-nodes",selectAll);
|
||||
@ -2206,6 +2207,15 @@ RED.view = (function() {
|
||||
}
|
||||
}
|
||||
|
||||
function editSelectedSubflow() {
|
||||
if (movingSet.length() > 0) {
|
||||
var node = movingSet.get(0).n;
|
||||
if (/^subflow:/.test(node.type)) {
|
||||
RED.workspaces.show(node.type.substring(8))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function copySelection() {
|
||||
if (mouse_mode === RED.state.SELECTING_NODE) {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user