API Reference
columnGeometry()
Derive the sanitized geometry for a flow container and column layout.
Import
import { columnGeometry } from "@graphrefly/ts/solutions/reactive-layout";
Signature
function columnGeometry(
container: FlowContainer,
columns: FlowColumns | undefined,
): {
readonly paddingX: number;
readonly paddingY: number;
readonly count: number;
readonly gap: number;
readonly width: number;
readonly height: number;
readonly columnWidth: number;
}
Parameters
| Parameter | Type | Description |
|---|---|---|
container | FlowContainer | Container dimensions and padding. |
columns | FlowColumns | undefined | Optional column configuration. |
Returns
The resolved padding, width, height, and per-column width.
Example
columnGeometry({ width: 800, height: 600 }, { count: 2, gap: 24 });
Source
packages/ts/src/solutions/reactive-layout/flow.ts