Skip to content

Commit

Permalink
Print parent and layout parent when debug printing a node
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoburns committed Oct 23, 2024
1 parent 8e720a6 commit 4879e6e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/blitz-dom/src/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,18 @@ impl Document {
}
}

println!("Parent: {:?}", node.parent);

let children: Vec<_> = node
.children
.iter()
.map(|id| &self.nodes[*id])
.map(|node| (node.id, node.order(), node.node_debug_str()))
.collect();

println!("Children: {:?}", children);

println!("Layout Parent: {:?}", node.layout_parent.get());

let layout_children: Vec<_> = node
.layout_children
.borrow()
Expand All @@ -89,7 +92,6 @@ impl Document {
.map(|id| &self.nodes[*id])
.map(|node| (node.id, node.order(), node.node_debug_str()))
.collect();

println!("Layout Children: {:?}", layout_children);
// taffy::print_tree(&self.dom, node_id.into());
}
Expand Down

0 comments on commit 4879e6e

Please sign in to comment.