Layout
From a script
ts
import { LayoutComponent } from "mmpx";
const layout = this.entity.TryGetComponent(LayoutComponent);Full API: LayoutComponent.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
Typetype | "none" | "horizontal" | "vertical" | "grid" | "none" | |
Alignmentalignment | "start" | "center" | "end" | "start" | |
Max ColumnsmaxColumns | number (0 … ∞) | 0 | 0 = as many as fit |
Resize ModeresizeMode | "none" | "container" | "children" | "none" |
Spacing
| Field | Type | Default | Description |
|---|---|---|---|
Padding ToppaddingTop | number | 0 | |
Padding RightpaddingRight | number | 0 | |
Padding BottompaddingBottom | number | 0 | |
Padding LeftpaddingLeft | number | 0 | |
Spacing XspacingX | number | 0 | |
Spacing YspacingY | number | 0 | |
Use Child ScaleaffectedByChildScale | boolean | false |