in src/components/graph-view.js [155:190]
constructor(props: IGraphViewProps) {
super(props);
this.nodeTimeouts = {};
this.edgeTimeouts = {};
this.renderNodesTimeout = null;
this.renderEdgesTimeout = null;
this.viewWrapper = React.createRef();
this.graphSvg = React.createRef();
this.highlightAreaRef = React.createRef();
// create a root map to avoid warning: You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before.
this.roots = {};
if (props.layoutEngineType) {
this.layoutEngine = new LayoutEngines[props.layoutEngineType](props);
}
this.state = {
componentUpToDate: false,
draggedEdge: null,
draggingEdge: false,
edgeEndNode: null,
edges: [],
edgesMap: {},
hoveredNode: false,
hoveredNodeData: null,
nodes: [],
nodesMap: {},
selectedEdgeObj: null,
selectedNodeObj: null,
selectingNode: false,
documentClicked: false,
svgClicked: false,
focused: true,
};
}