Skip to main content

Interface: FlexChild

Defined in: layout/flex.ts:16

Minimal child contract the flex strategy needs. Any object that exposes a size mode per axis and can be measured under constraints qualifies — the strategy never touches anything else, so it stays decoupled from SceneNode/TransformNode and is reusable outside the node tree.

Properties

heightMode

heightMode: SizeInput

Defined in: layout/flex.ts:18


mainFlex?

optional mainFlex?: number

Defined in: layout/flex.ts:24

Proportional weight for dividing the main-axis free space among fill children. Only consulted when this child fills the main axis; ignored otherwise. Undefined is treated as 1.


widthMode

widthMode: SizeInput

Defined in: layout/flex.ts:17

Methods

measure()

measure(constraints): Partial<Size2D>

Defined in: layout/flex.ts:25

Parameters

constraints

SizeConstraints

Returns

Partial<Size2D>