diff --git a/crates/viewer/re_view_graph/src/ui/draw.rs b/crates/viewer/re_view_graph/src/ui/draw.rs index 70d3e03b9f17..4122377be478 100644 --- a/crates/viewer/re_view_graph/src/ui/draw.rs +++ b/crates/viewer/re_view_graph/src/ui/draw.rs @@ -221,28 +221,6 @@ fn draw_node( node_ui.response() } -/// Draws a bounding box, as well as a basic coordinate system. -pub fn draw_debug(ui: &Ui, world_bounding_rect: Rect) { - let painter = ui.painter(); - - // Paint coordinate system at the world origin - let origin = Pos2::new(0.0, 0.0); - let x_axis = Pos2::new(100.0, 0.0); - let y_axis = Pos2::new(0.0, 100.0); - - painter.line_segment([origin, x_axis], Stroke::new(1.0, Color32::RED)); - painter.line_segment([origin, y_axis], Stroke::new(1.0, Color32::GREEN)); - - if world_bounding_rect.is_positive() { - painter.rect( - world_bounding_rect, - 0.0, - Color32::from_rgba_unmultiplied(255, 0, 255, 8), - Stroke::new(1.0, Color32::from_rgb(255, 0, 255)), - ); - } -} - /// Helper function to draw an arrow at the end of the edge fn draw_arrow(painter: &Painter, tip: Pos2, direction: Vec2, color: Color32) { let arrow_size = 10.0; // Adjust size as needed diff --git a/crates/viewer/re_view_graph/src/ui/mod.rs b/crates/viewer/re_view_graph/src/ui/mod.rs index ef5e09d555fa..901cef3073ec 100644 --- a/crates/viewer/re_view_graph/src/ui/mod.rs +++ b/crates/viewer/re_view_graph/src/ui/mod.rs @@ -2,6 +2,6 @@ mod draw; mod selection; mod state; -pub use draw::{draw_debug, draw_graph, DrawableLabel, LevelOfDetail}; +pub use draw::{draw_graph, DrawableLabel, LevelOfDetail}; pub use selection::view_property_force_ui; pub use state::GraphViewState; diff --git a/crates/viewer/re_view_graph/src/ui/state.rs b/crates/viewer/re_view_graph/src/ui/state.rs index d8dce815d1df..e15ec96afb3c 100644 --- a/crates/viewer/re_view_graph/src/ui/state.rs +++ b/crates/viewer/re_view_graph/src/ui/state.rs @@ -12,9 +12,6 @@ use crate::layout::{ForceLayoutParams, ForceLayoutProvider, Layout, LayoutReques #[derive(Default)] pub struct GraphViewState { pub layout_state: LayoutState, - - pub show_debug: bool, - pub visual_bounds: Option, pub rect_in_ui: Option, } @@ -35,12 +32,6 @@ impl GraphViewState { ui.end_row(); } - pub fn debug_ui(&mut self, ui: &mut egui::Ui) { - ui.re_checkbox(&mut self.show_debug, "Show debug information") - .on_hover_text("Shows debug information for the current graph"); - ui.end_row(); - } - pub fn simulation_ui(&mut self, ui: &mut egui::Ui) { if ui.button("Reset simulation").clicked() { self.layout_state.reset(); diff --git a/crates/viewer/re_view_graph/src/view.rs b/crates/viewer/re_view_graph/src/view.rs index 53741b7175a7..3bef101d01c3 100644 --- a/crates/viewer/re_view_graph/src/view.rs +++ b/crates/viewer/re_view_graph/src/view.rs @@ -28,7 +28,7 @@ use re_viewport_blueprint::ViewProperty; use crate::{ graph::Graph, layout::{ForceLayoutParams, LayoutRequest}, - ui::{draw_debug, draw_graph, view_property_force_ui, GraphViewState, LevelOfDetail}, + ui::{draw_graph, view_property_force_ui, GraphViewState, LevelOfDetail}, visualizers::{merge, EdgesVisualizer, NodeVisualizer}, }; @@ -131,7 +131,6 @@ Display a graph of nodes and edges. ui.selection_grid("graph_view_settings_ui").show(ui, |ui| { state.layout_ui(ui); state.simulation_ui(ui); - state.debug_ui(ui); }); re_ui::list_item::list_item_scope(ui, "graph_selection_ui", |ui| { @@ -199,11 +198,6 @@ Display a graph of nodes and edges. let graph_rect = draw_graph(ui, ctx, graph, layout, query, level_of_detail); world_bounding_rect = world_bounding_rect.union(graph_rect); } - - // We need to draw the debug information after the rest to ensure that we have the correct bounding box. - if state.show_debug { - draw_debug(ui, world_bounding_rect); - } }); if resp.hovered() {