Skip to content
Snippets Groups Projects
Commit 46479be2 authored by Maximilian Giller's avatar Maximilian Giller :squid:
Browse files

Fixes most instances of nodes and links being unclickable

parent 23bda816
No related branches found
No related tags found
1 merge request!2Implemented editor in the react framework
Pipeline #56891 passed
......@@ -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}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment