computeEndZoneStartRow
Finds the first row in the fixed-focus end zone
Available since @roku-sdk/flex-grid 3.3.0
import { computeEndZoneStartRow } from "@roku-sdk/flex-grid/geometry";Also exported as computeEndZoneStartRow from @roku-sdk/flex-grid (deprecated).
Deprecated: computeEndZoneStartRow. Import from @roku-sdk/flex-grid/geometry instead. The root export will be removed in the next major version.
computeEndZoneStartRow(params: FixedFocusYParams): numberDescription
Finds the first row in the fixed-focus end zone.
Empty content or content that fits the viewport returns zero. Row start positions must be non-decreasing. If no row reaches the end-zone threshold, the last row is selected. This calculation does not loop rows.
Parameters
| Name | Type | Description |
|---|---|---|
params | FixedFocusYParams | Viewport and row geometry in pixels, with a non-negative integer row count. |
Return values
The zero-based row index where end-zone pinning begins.
Example
computeEndZoneStartRow({ containerY: 0, viewportHeight: 200, numRows: 4, getRowY: r => r * 100, getRowHeight: () => 100 }); // 2Updated about 4 hours ago
What’s Next
Did this page help you?