diff --git a/editor/js/editor.js b/editor/js/editor.js index 0b5740b018c80c4b57eab1959f0d3e8b80ab9bb4..c111023b51817e6eb0f92685c3d800118a1a7d0f 100644 --- a/editor/js/editor.js +++ b/editor/js/editor.js @@ -78,6 +78,4 @@ function load() { graph.onChangeCallbacks.push((data) => { graphObj.graphData(data); }); - - graph.setRenderer(graphObj); } diff --git a/editor/js/graph.js b/editor/js/graph.js index d93015a869c80a8892526c8ea2ef6f6926191677..3df47b76144c6398e2b8dfd1e4015a3c5471e18d 100644 --- a/editor/js/graph.js +++ b/editor/js/graph.js @@ -49,11 +49,6 @@ export class Graph extends ManagedData { this.onChangeCallbacks = []; this.physicsDelay = STOP_PHYSICS_DELAY; this.physicsStopTimeoutId = undefined; - this.graphRenderer = undefined; - } - - setRenderer(graphRenderer) { - this.graphRenderer = graphRenderer; } restartSimulation() { @@ -62,10 +57,8 @@ export class Graph extends ManagedData { } - if (this.graphRenderer !== undefined) { - this.data = Graph.addIdentifiers(this.getCleanData(this.data, false)); - this.triggerOnChange(); - } + this.data = Graph.addIdentifiers(this.getCleanData(this.data, false)); + this.triggerOnChange(); // Deactivate physics after a short delay this.physicsStopTimeoutId = setTimeout(() => {