scrollTopFor
scrollTopFor(
rowY,rowHeight,align,viewportHeight,bodyHeight):number
Defined in: core/src/viewport/scroll.ts:153
The vertical scroll offset that shows a row at align, in body pixels (the
coordinates of RowMetrics.y and Viewport.scrollTop): 'start' puts the row at the top of
the body area, right below the sticky header, 'end' at its bottom, 'center' in its middle;
clamped to [0, bodyHeight - viewportHeight].
Parameters
Section titled “Parameters”number
Top of the row (RowMetrics.y).
rowHeight
Section titled “rowHeight”number
Height of the row, 0 or more.
Where it lands.
viewportHeight
Section titled “viewportHeight”number
Height of the body area visible below the sticky header, 0 or more.
bodyHeight
Section titled “bodyHeight”number
Height of all rows (RowLayout.bodyHeight).
Returns
Section titled “Returns”number
The clamped scroll offset.
Throws
Section titled “Throws”RangeError for non-finite or negative sizes, or a non-finite align.