GraphReFlyTS

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

ParameterTypeDescription
blockMaxWidthnumber | undefinedBlock-specific maximum width.
maxWidthnumberLayout-wide maximum width.

Returns

The tighter width constraint.

Example

blockMaxWidth(120, 80);

Source

packages/ts/src/solutions/reactive-layout/utils.ts