Skip to content
PACKAGES

measuredWidth()

Normalize a width-like value into a finite, non-negative width.

import { measuredWidth } from "@graphrefly/ts/solutions/reactive-layout";
function measuredWidth(value: number | { readonly width: number }): number
ParameterTypeDescription
valuenumber | { readonly width: number }Width value or object with a width field.

A non-negative width.

measuredWidth({ width: 24 });

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