From aae48a41a17e5f9d4d182fa03c8503f0d1bf2076 Mon Sep 17 00:00:00 2001 From: Maximilian Giller <m.giller@tu-bs.de> Date: Sun, 12 Dec 2021 18:15:49 +0100 Subject: [PATCH] Removed unnecessary connection between graph and 2d-force-graph --- editor/js/editor.js | 2 -- editor/js/graph.js | 11 ++--------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/editor/js/editor.js b/editor/js/editor.js index 0b5740b..c111023 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 d93015a..3df47b7 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(() => { -- GitLab