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

Redraw unselected link when joining nodes starts

This commit is contained in:
Nick O'Leary 2015-03-12 13:35:39 +00:00
parent f26cadab7f
commit 1d7f06bbba

View File

@ -1674,13 +1674,22 @@ RED.view = (function() {
} }
}) })
link.classed("link_selected", function(d) { link.classed("link_selected", function(d) { return d === selected_link || d.selected; });
link.classed("link_unknown",function(d) {
delete d.added; delete d.added;
return d === selected_link || d.selected; return d.target.type == "unknown" || d.source.type == "unknown"
}); });
link.classed("link_unknown",function(d) { return d.target.type == "unknown" || d.source.type == "unknown"}); } else {
// JOINING - unselect any selected links
vis.selectAll(".link_selected").data(
activeLinks,
function(d) {
return d.source.id+":"+d.sourcePort+":"+d.target.id+":"+d.target.i;
}
).classed("link_selected", false);
} }
if (d3.event) { if (d3.event) {
d3.event.preventDefault(); d3.event.preventDefault();
} }