Skip to content

Commit

Permalink
WIP: reset layout after every frame
Browse files Browse the repository at this point in the history
  • Loading branch information
grtlr committed Nov 5, 2024
1 parent 9d14402 commit 9585b16
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crates/viewer/re_space_view_graph/src/view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
}
Expand Down

0 comments on commit 9585b16

Please sign in to comment.