From 9585b164dcc949eb97adfa9816edeb9d8829a845 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jochen=20G=C3=B6rtler?= Date: Tue, 5 Nov 2024 10:46:14 +0100 Subject: [PATCH] WIP: reset layout after every frame --- crates/viewer/re_space_view_graph/src/view.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/viewer/re_space_view_graph/src/view.rs b/crates/viewer/re_space_view_graph/src/view.rs index fdafd9383e61..c5b247e6d534 100644 --- a/crates/viewer/re_space_view_graph/src/view.rs +++ b/crates/viewer/re_space_view_graph/src/view.rs @@ -283,8 +283,9 @@ impl SpaceViewClass for GraphSpaceView { // Update stored bounds on the state, so visualizers see an up-to-date value. state.world_bounds = Some(bounds); - // Clean up the layout for nodes that are no longer present. - state.layout.retain(|k, _| seen.contains(k)); + // For now, we reset the layout after every frame. Eventually, we want + // to keep information between frames so that the nodes don't jump around. + state.layout.clear(); Ok(()) }