mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
fix vanishing link in subflow
This commit is contained in:
parent
99a9e3a91b
commit
40ea759e2c
@ -413,6 +413,27 @@ RED.nodes = (function() {
|
|||||||
nodeTabMap[z] = {};
|
nodeTabMap[z] = {};
|
||||||
}
|
}
|
||||||
nodeTabMap[z][node.id] = node;
|
nodeTabMap[z][node.id] = node;
|
||||||
|
var nl = nodeLinks[node.id];
|
||||||
|
if (nl) {
|
||||||
|
nl.in.forEach((l) => {
|
||||||
|
var idx = linkTabMap[node.z].indexOf(l);
|
||||||
|
if (idx != -1) {
|
||||||
|
linkTabMap[node.z].splice(idx, 1);
|
||||||
|
}
|
||||||
|
if ((l.source.z === z) && linkTabMap[z]) {
|
||||||
|
linkTabMap[z].push(l);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
nl.out.forEach((l) => {
|
||||||
|
var idx = linkTabMap[node.z].indexOf(l);
|
||||||
|
if (idx != -1) {
|
||||||
|
linkTabMap[node.z].splice(idx, 1);
|
||||||
|
}
|
||||||
|
if ((l.target.z === z) && linkTabMap[z]) {
|
||||||
|
linkTabMap[z].push(l);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
node.z = z;
|
node.z = z;
|
||||||
RED.events.emit("nodes:change",node);
|
RED.events.emit("nodes:change",node);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user