Move common node creation/editing ui to own function, can edit whole node from creation menu
This commit is contained in:
@@ -34,6 +34,12 @@ impl Board {
|
||||
});
|
||||
}
|
||||
|
||||
pub fn insert_node(&mut self, node: Node) -> usize {
|
||||
let id = self.next_id();
|
||||
self.nodes.insert(id, node);
|
||||
id
|
||||
}
|
||||
|
||||
pub fn remove_node(&mut self, id: usize) {
|
||||
// We remove this node from the graph, then drop it from each
|
||||
// other nodes edge.
|
||||
|
||||
Reference in New Issue
Block a user