Skip to content
Snippets Groups Projects
Commit 7c62a009 authored by Maximilian Giller's avatar Maximilian Giller
Browse files

Fixed missing this-bind, now graph selector working

parent ebe272fd
No related branches found
No related tags found
1 merge request!2Implemented editor in the react framework
Pipeline #56556 failed
...@@ -26,6 +26,7 @@ export class Editor extends React.PureComponent<propTypes, stateTypes> { ...@@ -26,6 +26,7 @@ export class Editor extends React.PureComponent<propTypes, stateTypes> {
constructor(props: propTypes) { constructor(props: propTypes) {
super(props); super(props);
this.loadGraph = this.loadGraph.bind(this); this.loadGraph = this.loadGraph.bind(this);
this.loadSpace = this.loadSpace.bind(this);
// Set as new state // Set as new state
this.state = { this.state = {
...@@ -57,7 +58,6 @@ export class Editor extends React.PureComponent<propTypes, stateTypes> { ...@@ -57,7 +58,6 @@ export class Editor extends React.PureComponent<propTypes, stateTypes> {
public loadGraph(data: any): boolean { public loadGraph(data: any): boolean {
console.log("Starting to load new graph ..."); console.log("Starting to load new graph ...");
console.log(data); console.log(data);
console.log(Graph.parse(data));
// Create global objects // Create global objects
const newState = new State(); const newState = new State();
...@@ -126,6 +126,7 @@ export class Editor extends React.PureComponent<propTypes, stateTypes> { ...@@ -126,6 +126,7 @@ export class Editor extends React.PureComponent<propTypes, stateTypes> {
// }); // });
// Set as new state // Set as new state
console.log(newGraph);
this.setState({ this.setState({
state: newState, state: newState,
graph: newGraph, graph: newGraph,
......
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