Function egui_graphs::add_node
source · pub fn add_node<N: Clone, E: Clone, Ty: EdgeType, Ix: IndexType, D: DisplayNode<N, E, Ty, Ix>>(
g: &mut Graph<N, E, Ty, Ix, D>,
n: &N
) -> NodeIndex<Ix>
Expand description
Helper function which adds user’s node to the super::Graph
instance.
If graph is not empty it picks any node position and adds new node in the vicinity of it.