diff --git a/src/editor/js/components/editor.tsx b/src/editor/js/components/editor.tsx index ab1d5a9e2ca8feb919c7ddd73d00c45042fa5062..0807d4bda205f7c1a9088c1e3d7eda3b86fafdb0 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}