Skip to main content

Function: setNodeSizes()

function setNodeSizes(
layout,
view,
sizes,
fallback?
): Layout;

Writes sizes (rounded to integers, at least 1) into view, keeping the other fields of each entry; x/y are written too when given (a resize from the top or left edge). In the default view an entry without a position gets fallback[id] (the drawn position), or is skipped.

Parameters​

layout​

Layout | null

view​

string

sizes​

Record<string, NodeSize>

fallback?​

Record<string, { x: number; y: number; }>

Returns​

Layout