Repository: blitzarx1/egui_graphs (language: rust)

Issue:
Rendering graph inside an egui::Window 
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 :

![image](https://github.com/blitzarx1/egui_graphs/assets/10063471/3d83aade-25f5-46aa-9035-5e580e7913c3)

But when doing the same approach with an egui::Window it fails, and nothing show up (empty egui::Window).

![image](https://github.com/blitzarx1/egui_graphs/assets/10063471/bc8e0fd6-e349-4094-9003-a7faa3548453)

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)
```rust

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 = "0.25.0"
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"]}
```



Discussion / hints:

Fix patch:
diff --git a/src/draw/drawer.rs b/src/draw/drawer.rs
index e6ab4d0..bc40434 100644
--- a/src/draw/drawer.rs
+++ b/src/draw/drawer.rs
@@ -47,7 +47,10 @@ where
             .painter
             .clone()
             .with_layer_id(LayerId::new(Order::Foreground, Id::new("top")));
-        let layer_bot = ctx.painter.clone().with_layer_id(LayerId::background());
+        let layer_bot = ctx
+            .painter
+            .clone()
+            .with_layer_id(LayerId::new(Order::Middle, Id::new("bot")));
         Drawer {
             layer_top,
             layer_bot,


Test patch: