blitzarx1 / egui_graphs

Interactive graph visualization widget for rust powered by egui and petgraph
https://docs.rs/crate/egui_graphs
MIT License
388 stars 29 forks source link

Add ability to remove nodes #176

Closed XertroV closed 6 months ago

XertroV commented 7 months ago

Removing nodes is currently broken atm if you add more nodes afterwards. This is probably because the indexes get out of sync between egui_graphs and petgraph. You can observe the bug in the configurable example by reducing and then increasing the node count. Nodes end up looping back to themselves (which is the same behavior I see)

blitzarx1 commented 7 months ago

You can check the flow in the configurable example. I agree that it is far from ideal, and I have plans to add addition and deletion of nodes to the graph API.

blitzarx1 commented 6 months ago

Done 🚀