diff --git a/the-graph/the-graph-graph.js b/the-graph/the-graph-graph.js index 7c5e314a..0578c2dc 100644 --- a/the-graph/the-graph-graph.js +++ b/the-graph/the-graph-graph.js @@ -107,7 +107,7 @@ this.props.graph.on("removeInitial", this.resetPortRoute); // Listen to noflo graph object's events - this.props.graph.on("changeNode", this.markDirty); + this.props.graph.on("changeNode", this.onChangeNode); this.props.graph.on("changeInport", this.markDirty); this.props.graph.on("changeOutport", this.markDirty); this.props.graph.on("endTransaction", this.markDirty); @@ -202,6 +202,16 @@ } } }, + triggerMoveNode: null, + onChangeNode: function (node, before) { + if (!this.triggerMoveNode) { + this.triggerMoveNode = function () { + this.markDirty(); + delete this.triggerMoveNode; + }.bind(this); + window.setTimeout(this.triggerMoveNode, 0); + } + }, getComponentInfo: function (componentName) { return this.props.library[componentName]; },