Skip to main content

Module engine

Module engine 

Source
Expand description

The layout ENGINE: taffy’s algorithms (flexbox, grid, block) over the surface’s own node slots (taffy’s “custom tree” API), so the core controls what TaffyTree hides:

  • a measured leaf answers with its size AND its first BASELINE (alignItems: baseline aligns text by its first line, not its bottom);
  • nodes live in STABLE SLOTS (the surface’s node indices): a re-windowed list or an opened overlay touches only the slots that changed, and mark_dirty clears the layout cache of a node and its ancestors only;
  • content_size per node (scroll containers report their scrollable extent).

Structs§

ChildIter
Engine
One tree of slots; several roots (the main tree, every overlay layer).
LeafAnswer
What a measured leaf answers for one taffy request.

Type Aliases§

MeasureFn
The measure callback: (slot, known size, available space) → answer.