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

Ensure links do not span tabs in the editor

This commit is contained in:
Nick O'Leary 2017-01-19 13:24:21 +00:00
parent 4195840b2c
commit daca78b6cd
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -1004,9 +1004,13 @@ RED.nodes = (function() {
var wires = (n.wires[w1] instanceof Array)?n.wires[w1]:[n.wires[w1]];
for (var w2=0;w2<wires.length;w2++) {
if (node_map.hasOwnProperty(wires[w2])) {
var link = {source:n,sourcePort:w1,target:node_map[wires[w2]]};
addLink(link);
new_links.push(link);
if (n.z === node_map[wires[w2]].z) {
var link = {source:n,sourcePort:w1,target:node_map[wires[w2]]};
addLink(link);
new_links.push(link);
} else {
console.log("Warning: dropping link that crosses tabs:",n.id,"->",node_map[wires[w2]].id);
}
}
}
}