add some utilities around AnyValueRc
This commit is contained in:
1 parent
0c0158f62d
commit
0813d531f1
5 files changed
+49
-12
No files matched your search
@@ -185,9 +185,9 @@ fn render_vdom(
|
||||
let rdom = rdom.borrow();
|
||||
let mut taffy = taffy.lock().expect("taffy lock poisoned");
|
||||
// size is guaranteed to not change when rendering
|
||||
resize(frame.size(), &mut *taffy, &rdom);
|
||||
resize(frame.size(), &mut taffy, &rdom);
|
||||
let root = &rdom[NodeId(0)];
|
||||
render::render_vnode(frame, &*taffy, &rdom, root, cfg, Point::ZERO);
|
||||
render::render_vnode(frame, &taffy, &rdom, root, cfg, Point::ZERO);
|
||||
})?;
|
||||
} else {
|
||||
let rdom = rdom.borrow();
|
||||
|
||||
@@ -89,7 +89,7 @@ impl<'a> ElementRef<'a> {
|
||||
.ok();
|
||||
layout.map(|layout| Layout {
|
||||
order: layout.order,
|
||||
size: layout.size.map(|v| layout_to_screen_space(v)),
|
||||
size: layout.size.map(layout_to_screen_space),
|
||||
location: Point {
|
||||
x: layout_to_screen_space(layout.location.x),
|
||||
y: layout_to_screen_space(layout.location.y),
|
||||
|
||||
Reference in new issue
Block a user