mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
fix converting selection to subflow
This commit is contained in:
parent
6ab520984c
commit
86928bbb2d
@ -301,6 +301,17 @@ RED.nodes = (function() {
|
||||
return {links:removedLinks,nodes:removedNodes};
|
||||
}
|
||||
|
||||
function moveNodeToTab(node, z) {
|
||||
if (nodeTabMap[node.z]) {
|
||||
delete nodeTabMap[node.z][node.id];
|
||||
}
|
||||
if (!nodeTabMap[z]) {
|
||||
nodeTabMap[z] = {};
|
||||
}
|
||||
nodeTabMap[z][node.iz] = node;
|
||||
node.z = z;
|
||||
}
|
||||
|
||||
function removeLink(l) {
|
||||
var index = links.indexOf(l);
|
||||
if (index != -1) {
|
||||
@ -1466,6 +1477,8 @@ RED.nodes = (function() {
|
||||
remove: removeNode,
|
||||
clear: clear,
|
||||
|
||||
moveNodeToTab: moveNodeToTab,
|
||||
|
||||
addLink: addLink,
|
||||
removeLink: removeLink,
|
||||
|
||||
|
@ -723,7 +723,7 @@ RED.subflow = (function() {
|
||||
}
|
||||
n.x -= offsetX;
|
||||
n.y -= offsetY;
|
||||
n.z = subflow.id;
|
||||
RED.nodes.moveNodeToTab(n, subflow.id);
|
||||
}
|
||||
|
||||
RED.history.push({
|
||||
|
Loading…
Reference in New Issue
Block a user