diff --git a/editor/js/graph.js b/editor/js/graph.js index 665a9e59798d8c97b88e2bd25c68dabe49be7917..d5a67651f417cd0290cb0e29d949e744d9ffe83c 100644 --- a/editor/js/graph.js +++ b/editor/js/graph.js @@ -61,16 +61,21 @@ export class Graph extends ManagedData { clearTimeout(this.physicsStopTimeoutId); } + if (this.graphRenderer !== undefined) { - this.data[GRAPH_NODES].forEach((n) => { - n.x /= 10; - n.y /= 10; - n.fx = undefined; - n.fy = undefined; - }); - - this.graphRenderer.d3ReheatSimulation(); + this.graphRenderer.graphData(this.getCleanData(this.data, false)); } + // this.onChangeCallbacks.forEach((fn) => fn(this.getCleanData(this.data, false))); + // if (this.graphRenderer !== undefined) { + // this.data[GRAPH_NODES].forEach((n) => { + // n.x /= 10; + // n.y /= 10; + // n.fx = undefined; + // n.fy = undefined; + // }); + + // this.graphRenderer.d3ReheatSimulation(); + // } // Deactivate physics after a short delay this.physicsStopTimeoutId = setTimeout(() => {