API Reference
blockMaxWidth()
Resolve the effective maximum width for a block.
Import
import { blockMaxWidth } from "@graphrefly/ts/solutions/reactive-layout";
Signature
function blockMaxWidth(
blockMaxWidth: number | undefined,
maxWidth: number,
): number
Parameters
| Parameter | Type | Description |
|---|---|---|
blockMaxWidth | number | undefined | Block-specific maximum width. |
maxWidth | number | Layout-wide maximum width. |
Returns
The tighter width constraint.
Example
blockMaxWidth(120, 80);
Source
packages/ts/src/solutions/reactive-layout/utils.ts