diff --git a/crates/state/src/layout.rs b/crates/state/src/layout.rs index 6a74e3f4f..7dc305d84 100644 --- a/crates/state/src/layout.rs +++ b/crates/state/src/layout.rs @@ -31,6 +31,7 @@ pub struct LayoutState { pub position: Position, pub content: Content, pub node_ref: Option, + pub node_id: NodeId } #[partial_derive_state] @@ -76,7 +77,10 @@ impl State for LayoutState { let torin_layout = context.get::>>>().unwrap(); let scale_factor = context.get::().unwrap(); - let mut layout = LayoutState::default(); + let mut layout = LayoutState { + node_id: node_view.node_id(), + ..Default::default() + }; if let Some(attributes) = node_view.attributes() { for attr in attributes {