CanvasLayout

A scene's canvas split into its environments, its blank-canvas content and the split's arrangement.

@internote/canvas-sdk/hostInterface
On this page
import { CanvasLayout } from '@internote/canvas-sdk/host';

#Fields

blankRequired
The blank-canvas content: every detail element outside the canvas nodes, in source order.
CompiledNode[]
directionRequired
The split's arrangement as declared, meaningful only with two environments. Pass it through resolveSplitDirection for the concrete axis, since auto is not an axis.
autohorizontalvertical
environmentsRequired
The environments in primacy order: none, one or two.
CompiledNode[]
gridRequired
Where the environments came from a grid node: how many panes it holds and the columns: it wrote, if any — the columns themselves are settled at render, against the canvas's shape (gridColumns). Null for a scene that writes none, whose environments are a split.
{ count: number; declared: unknown } | null
itemsRequired
Every detail element in source order, tagged with its kind: what a render host draws from. The two lists below are the same nodes sorted into their kinds; only this list remembers that the author wrote a table above the graph rather than below it.
CanvasLayoutItem[]
ratioRequired
The first environment's share over the second's. 1 when the scene declares none.
number

Declared in packages/canvas-sdk/src/host/layout.ts:62.

Last updated