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

Hooked initial loading of graph to Mount-Hook

parent 8e5b0f4d
No related branches found
No related tags found
No related merge requests found
Pipeline #56929 passed
...@@ -12,7 +12,9 @@ import { Link } from "../structures/graph/link"; ...@@ -12,7 +12,9 @@ import { Link } from "../structures/graph/link";
import { NodeTypesEditor } from "./nodetypeseditor"; import { NodeTypesEditor } from "./nodetypeseditor";
import { SpaceManager } from "./spacemanager"; import { SpaceManager } from "./spacemanager";
type propTypes = any; type propTypes = {
spaceId: string;
};
type stateTypes = { type stateTypes = {
graph: Graph; graph: Graph;
visibleLabels: boolean; visibleLabels: boolean;
...@@ -72,9 +74,13 @@ export class Editor extends React.PureComponent<propTypes, stateTypes> { ...@@ -72,9 +74,13 @@ export class Editor extends React.PureComponent<propTypes, stateTypes> {
keys: {}, keys: {},
graphWidth: 1000, graphWidth: 1000,
}; };
}
// Load initial space componentDidMount() {
this.loadSpace("space"); if (this.props.spaceId !== undefined) {
// Load initial space
this.loadSpace(this.props.spaceId);
}
} }
/** /**
......
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