Skip to content

Commit

Permalink
Display space views using view coordinates from closest ancestor. (#3748
Browse files Browse the repository at this point in the history
)

### What
View coordinates are a bit special -- we want to respect them even if
they are not explicitly part of the given space-view.

Resolves: #3538
  • Loading branch information
jleibs authored Oct 10, 2023
1 parent 2f7de89 commit 01a0f68
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions crates/re_space_view_spatial/src/ui_3d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,10 @@ pub fn view_3d(
let view_coordinates = ctx
.store_db
.store()
.query_latest_component(query.space_origin, &ctx.current_query())
.map(|c| c.value);
// Allow logging view-coordinates to `/` and have it apply to `/world` etc.
// See https://github.com/rerun-io/rerun/issues/3538
.query_latest_component_at_closest_ancestor(query.space_origin, &ctx.current_query())
.map(|(_, c)| c.value);

let (rect, mut response) =
ui.allocate_at_least(ui.available_size(), egui::Sense::click_and_drag());
Expand Down

0 comments on commit 01a0f68

Please sign in to comment.