Rendering graph inside an egui::Window
deft01 opened this issue · comments
Hi,
First of all thanks for this amazing project.
My trying to accomplish a simple task. Rendering a graph inside of an egui::Window.
When following your examples and rendering inside an egui::CentralPanel everything work as expected :
But when doing the same approach with an egui::Window it fails, and nothing show up (empty egui::Window).
The code of my egui::Window is the following if you want to try reproduce :
(using the "basic" example you provided but with an egui::Window)
egui::Window::new(RichText::new(format!("test_title")).color(graph.sync_color))
.resizable(true)
.open(&mut graph.is_visible)
.show(ctx, |ui| {
ui.add(&mut GraphView::<
_,
_,
_,
_,
DefaultNodeShape,
DefaultEdgeShape,
>::new(&mut selector.force_directed_graph.as_mut().unwrap()));
});
Or if you could provide a working example using an egui::Window instead of an egui::CentralPanel. It could help me a lot debugging.
Versions (toml) :
egui_extras = { version = "0.25.0", features = ["svg", "image"]}
eframe = { version = "0.25.0", default-features = false, features = [
"accesskit", # Make egui comptaible with screen readers. NOTE: adds a lot of dependencies.
"default_fonts", # Embed the default egui fonts.
"glow", # Use the glow rendering backend. Alternative: "wgpu".
"persistence", # Enable restoring app state when restarting the app.
] }
egui_tracing = "0.2.1"
petgraph = "0.6"
egui_graphs = { version = "0.18.0", features = ["egui_persistence"]}
Thanks for discovering this bug, fix is on its way