From a62bb0b2917e7a068b239e92cf47294c92ae3489 Mon Sep 17 00:00:00 2001
From: Maximilian Giller <m.giller@tu-bs.de>
Date: Sun, 12 Dec 2021 18:11:59 +0100
Subject: [PATCH] Fixed restart to actually reload the graph #1

---
 editor/js/graph.js | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/editor/js/graph.js b/editor/js/graph.js
index d5a6765..d93015a 100644
--- a/editor/js/graph.js
+++ b/editor/js/graph.js
@@ -63,19 +63,9 @@ export class Graph extends ManagedData {
 
         
         if (this.graphRenderer !== undefined) {
-            this.graphRenderer.graphData(this.getCleanData(this.data, false));
+            this.data = Graph.addIdentifiers(this.getCleanData(this.data, false));
+            this.triggerOnChange();
         }
-        // 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(() => {
-- 
GitLab