chore: Bump taffy version to 0.4.3 (#11606)
Taffy 0.4 has been released 2 months ago. We've been using an older commit from their 0.4 development branch since November. Compared to the commit we were pinned to, the following relevant changes have been made: - https://github.com/DioxusLabs/taffy/commit/563d5dcee7b9138b4c3f865155d036a8b7597e65 - https://github.com/DioxusLabs/taffy/commit/64f8aa0fb114d939ca0d53ddc44045a03fde548d - https://github.com/DioxusLabs/taffy/commit/70b35712a2e79b6fdfef4cff4392ca94287cd0b1  Release Notes: - N/A
This commit is contained in:
@@ -9,14 +9,14 @@ use taffy::{
|
||||
geometry::{Point as TaffyPoint, Rect as TaffyRect, Size as TaffySize},
|
||||
style::AvailableSpace as TaffyAvailableSpace,
|
||||
tree::NodeId,
|
||||
Taffy,
|
||||
TaffyTree, TraversePartialTree as _,
|
||||
};
|
||||
|
||||
type NodeMeasureFn =
|
||||
Box<dyn FnMut(Size<Option<Pixels>>, Size<AvailableSpace>, &mut WindowContext) -> Size<Pixels>>;
|
||||
|
||||
pub struct TaffyLayoutEngine {
|
||||
taffy: Taffy,
|
||||
taffy: TaffyTree<()>,
|
||||
styles: FxHashMap<LayoutId, Style>,
|
||||
children_to_parents: FxHashMap<LayoutId, LayoutId>,
|
||||
absolute_layout_bounds: FxHashMap<LayoutId, Bounds<Pixels>>,
|
||||
@@ -29,7 +29,7 @@ static EXPECT_MESSAGE: &str = "we should avoid taffy layout errors by constructi
|
||||
impl TaffyLayoutEngine {
|
||||
pub fn new() -> Self {
|
||||
TaffyLayoutEngine {
|
||||
taffy: Taffy::new(),
|
||||
taffy: TaffyTree::new(),
|
||||
styles: FxHashMap::default(),
|
||||
children_to_parents: FxHashMap::default(),
|
||||
absolute_layout_bounds: FxHashMap::default(),
|
||||
@@ -114,7 +114,7 @@ impl TaffyLayoutEngine {
|
||||
fn max_depth(&self, depth: u32, parent: LayoutId) -> anyhow::Result<u32> {
|
||||
println!(
|
||||
"{parent:?} at depth {depth} has {} children",
|
||||
self.taffy.child_count(parent.0)?
|
||||
self.taffy.child_count(parent.0)
|
||||
);
|
||||
|
||||
let mut max_child_depth = 0;
|
||||
|
||||
Reference in New Issue
Block a user