Vue/graf/src/middleware/GrafModel.js
// Adds a node both to the graph model and the simulation
Adds a node both to the graph model and the simulation
Adds a node both to the graph model and the simulation
addNode(label=this.curr_node_id, style=null) {
		let sim_id = parseInt(`${this.curr_node_id}`);
		let node = new Node(this.curr_node_id, label, sim_id, style);
		this.sim_wrapper.addSimNode(sim_id);
		this.id_node_map.set(this.curr_node_id, node);
		this.curr_node_id += 1;
	}
addNode ( label = this . curr_node_id , style = null ) { let sim_id = parseInt ( ` ${ this . curr_node_id } ` ) ; let node = new Node ( this . curr_node_id , label , sim_id , style ) ; this . sim_wrapper . addSimNode ( sim_id ) ; this . id_node_map . set ( this . curr_node_id , node ) ; this . curr_node_id += 1 ; }
Adds a node both to the graph model and the simulation
Adds a node both to the graph model and the simulation