fix: use ready nodes in more places

This commit is contained in:
Jonathan Kelley committed 2022-12-25 01:37:00 -05:00
1 parent 85f6ea0545
commit 9b0244ee5c
10 files changed
+20 -20

No files matched your search

+1 -1
View File
@@ -17,7 +17,7 @@ fn app(cx: Scope) -> Element {
width: "100%",
background_color: "hsl({hue}, 70%, {brightness}%)",
onmousemove: move |evt| {
if let RenderReturn::Sync(Some(node)) = cx.root_node() {
if let RenderReturn::Ready(node) = cx.root_node() {
if let Some(id) = node.root_ids[0].get() {
let node = tui_query.get(id);
let Size{width, height} = node.size().unwrap();