Skip to content

Conversation

@waywardmonkeys
Copy link
Contributor

  • Introduce a new understory_taffy crate to bridge Taffy’s high-level TaffyTree API with understory_box_tree::Tree, wiring Taffy’s layout results into LocalNode::local_bounds.
  • Provide TaffyBoxMap as a non-owning adapter that maintains a mapping from taffy::NodeId to understory_box_tree::NodeId and exposes sync_layout / sync_layout_and_commit for any Tree<B> backend, plus a TaffyBoxTree convenience wrapper that owns a box tree and embeds a TaffyBoxMap.

- Introduce a new `understory_taffy` crate to bridge Taffy’s high-level
  `TaffyTree` API with `understory_box_tree::Tree`, wiring Taffy’s layout
  results into `LocalNode::local_bounds`.
- Provide `TaffyBoxMap` as a non-owning adapter that maintains a mapping
  from `taffy::NodeId` to `understory_box_tree::NodeId` and exposes
  `sync_layout` / `sync_layout_and_commit` for any `Tree<B>` backend,
  plus a `TaffyBoxTree` convenience wrapper that owns a box tree and
  embeds a `TaffyBoxMap`.
- Change `sync_layout` to treat Taffy positions as parent-relative
  transforms and write size-only `local_bounds`, so box-tree
  transforms are cumulative and nested layout is correct.
- Introduce `sync_layout_with` to let callers run custom logic
  (e.g. visual transform computation) between Taffy layout and
  box-tree updates.
- Add `layout_size_rect` helper and wire up `Affine::translate`
  for the default mapping.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant