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

Removed unnecessary print statements

parent 169fab7b
No related branches found
No related tags found
1 merge request!2Implemented editor in the react framework
Pipeline #56553 failed
...@@ -60,12 +60,11 @@ export class Editor extends React.PureComponent< ...@@ -60,12 +60,11 @@ export class Editor extends React.PureComponent<
* @returns True, if successful. * @returns True, if successful.
*/ */
public loadGraph(data: any): boolean { public loadGraph(data: any): boolean {
console.log("Starting to load ..."); console.log("Starting to load new graph ...");
console.log(data); console.log(data);
console.log(Graph.parse(data)); console.log(Graph.parse(data));
// Create global objects // Create global objects
// TODO: is not loading properly
console.log("Parsing ...");
const newState = new State(); const newState = new State();
const newGraph = Graph.parse(data); const newGraph = Graph.parse(data);
Editor.globalState = newState; Editor.globalState = newState;
...@@ -132,7 +131,6 @@ export class Editor extends React.PureComponent< ...@@ -132,7 +131,6 @@ export class Editor extends React.PureComponent<
// }); // });
// Set as new state // Set as new state
console.log("Updating state ...");
this.setState({ this.setState({
state: newState, state: newState,
graph: newGraph, graph: newGraph,
...@@ -142,7 +140,6 @@ export class Editor extends React.PureComponent< ...@@ -142,7 +140,6 @@ export class Editor extends React.PureComponent<
document.onkeydown = newState.onKeyDown; document.onkeydown = newState.onKeyDown;
document.onkeyup = newState.onKeyUp; document.onkeyup = newState.onKeyUp;
console.log("Finished loading!");
return true; return true;
} }
......
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