MeasureFunction
import type { MeasureFunction } from 'pixi-silk/layout';
type MeasureFunction = (availableWidth: number, availableHeight: number) => Size & {
baseline?: number;
};
Measures leaf content (text, a sprite) for the space offered. Either argument is Infinity
when that axis is unconstrained. Return the content size without padding. baseline is the
distance from the top to the first text baseline, for alignItems: 'baseline'.
Parameters#
| Parameter | Type |
|---|---|
availableWidth | number |
availableHeight | number |
Returns#
Size & {
baseline?: number;
}