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

Merge branch 'pr_2895' into dev

This commit is contained in:
Nick O'Leary 2021-03-10 21:31:27 +00:00
commit 2de43b719e
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -413,6 +413,27 @@ RED.nodes = (function() {
nodeTabMap[z] = {};
}
nodeTabMap[z][node.id] = node;
var nl = nodeLinks[node.id];
if (nl) {
nl.in.forEach(function(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(function(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;
RED.events.emit("nodes:change",node);
}