layoutMode
Determines whether this layer uses auto-layout to position its children. Defaults to "NONE".
Supported On:
Signature
layoutMode: 'NONE' | 'HORIZONTAL' | 'VERTICAL'
Remarks
Changing this property will cause the position of the children of this layer to change as a side-effect. It also causes the size of this layer to change, since at least one dimension of auto-layout frames is automatically calculated.
As a consequence, note that if a frame has layoutMode === "NONE"
, calling layoutMode = "VERTICAL"; layoutMode = "NONE"
does not leave the document unchanged. Removing auto-layout from a frame does not restore the children to their original positions.
This property must be set to "HORIZONTAL"
or "VERTICAL"
in order for the layoutAlign
, counterAxisSizingMode
, horizontalPadding
, verticalPadding
, itemSpacing
, itemReverseZIndex
, strokesIncludedInLayout
properties to be applicable.