computeTotalContentHeight
Computes the content height without a trailing row gap
Available since @roku-sdk/flex-grid 3.3.0
import { computeTotalContentHeight } from "@roku-sdk/flex-grid/geometry";Also exported as computeTotalContentHeight from @roku-sdk/flex-grid (deprecated).
Deprecated: computeTotalContentHeight. Import from @roku-sdk/flex-grid/geometry instead. The root export will be removed in the next major version.
computeTotalContentHeight(params: FixedFocusYParams): numberDescription
Computes the content height without a trailing row gap.
Zero rows returns zero without calling either row accessor. Row indices are zero-based; positions and heights must describe the same content coordinate system.
Parameters
| Name | Type | Description |
|---|---|---|
params | FixedFocusYParams | Row geometry with positions and heights in pixels. |
Return values
The last row start plus its height in pixels, or zero for no rows.
Example
computeTotalContentHeight({ containerY: 0, viewportHeight: 200, numRows: 2, getRowY: r => r * 100, getRowHeight: () => 100 }); // 200Updated about 4 hours ago
What’s Next
Did this page help you?