Hide junction ports whilst dragging nodes

This commit is contained in:
Nick O'Leary
2022-05-12 10:02:35 +01:00
parent a22f569ca0
commit f6aee81651
2 changed files with 12 additions and 3 deletions

View File

@@ -172,7 +172,8 @@ RED.view = (function() {
length: function() { return set.length},
get: function(i) { return set[i] },
forEach: function(func) { set.forEach(func) },
nodes: function() { return set.map(function(n) { return n.n })}
nodes: function() { return set.map(function(n) { return n.n })},
has: function(node) { return setIds.has(node.id) }
}
return api;
})();
@@ -4917,6 +4918,7 @@ RED.view = (function() {
var junction = d3.select(this);
this.setAttribute("transform", "translate(" + (d.x) + "," + (d.y) + ")");
if (d.dirty) {
junction.classed("red-ui-flow-junction-dragging", mouse_mode === RED.state.MOVING_ACTIVE && movingSet.has(d))
junction.classed("selected", !!d.selected)
dirtyNodes[d.id] = d;