Skip to content

Commit

Permalink
fix: Bring back node id layout check (#568)
Browse files Browse the repository at this point in the history
  • Loading branch information
marc2332 authored Apr 1, 2024
1 parent 3cbc27b commit 6cca92b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crates/state/src/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ pub struct LayoutState {
pub position: Position,
pub content: Content,
pub node_ref: Option<NodeReference>,
pub node_id: NodeId
}

#[partial_derive_state]
Expand Down Expand Up @@ -76,7 +77,10 @@ impl State<CustomAttributeValues> for LayoutState {
let torin_layout = context.get::<Arc<Mutex<Torin<NodeId>>>>().unwrap();
let scale_factor = context.get::<f32>().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 {
Expand Down

0 comments on commit 6cca92b

Please sign in to comment.