From 46479be2b40ef6c876fff425ce6145512f9d2b54 Mon Sep 17 00:00:00 2001
From: Maximilian Giller <m.giller@tu-bs.de>
Date: Mon, 29 Aug 2022 19:39:28 +0200
Subject: [PATCH] Fixes most instances of nodes and links being unclickable

---
 src/editor/js/components/editor.tsx | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/editor/js/components/editor.tsx b/src/editor/js/components/editor.tsx
index ab1d5a9..0807d4b 100644
--- a/src/editor/js/components/editor.tsx
+++ b/src/editor/js/components/editor.tsx
@@ -165,8 +165,6 @@ export class Editor extends React.PureComponent<propTypes, stateTypes> {
         const newNode = new Node();
 
         newNode.label = "Unnamed";
-        (newNode as any).fx = position.graph.x;
-        (newNode as any).fy = position.graph.y;
         (newNode as any).x = position.graph.x;
         (newNode as any).y = position.graph.y;
         (newNode as any).vx = 0;
@@ -399,7 +397,6 @@ export class Editor extends React.PureComponent<propTypes, stateTypes> {
     }
 
     render(): React.ReactNode {
-        // The id "ks-editor" indicates, that the javascript associated with this should automatically be executed
         return (
             <div id="ks-editor">
                 <h1>Interface</h1>
@@ -411,7 +408,10 @@ export class Editor extends React.PureComponent<propTypes, stateTypes> {
                             <ReactForceGraph2d
                                 ref={this.renderer}
                                 width={2000}
-                                graphData={this.state.graph.data}
+                                graphData={{
+                                    nodes: this.state.graph.data.nodes,
+                                    links: this.state.graph.links,
+                                }}
                                 onNodeClick={this.handleNodeClick}
                                 autoPauseRedraw={false}
                                 cooldownTicks={0}
-- 
GitLab