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

unwrap panic when resizing an egui window over the top of a graph #169

Closed XertroV closed 1 month ago

XertroV commented 7 months ago

unwrap occurs here in graph_view.rs:

if resp.drag_started() {
    if let Some(idx) = self.g.node_by_screen_pos(meta, resp.hover_pos().unwrap()) {
        self.set_drag_start(idx);
    }
}
blitzarx1 commented 7 months ago

I can't reproduce it. I resized it in configurable example and everything was fine. Could you please specify the conditions under which panic happens?

blitzarx1 commented 7 months ago

Isn't #175 fixes it?