viewport

Which rows of a list are near the viewport. The one definition of "near" shared by the texture window (textureManager.bs) and the TV guide's program window (guidePrograms.bs), so the two cannot drift into different answers to the same question.

Methods

(static) rowWindow(focusedRow, numVisibleRows, totalRows, bufferRows) → {object}

The rows around a focused row, as [bufferStart, visibleStart, visibleEnd, bufferEnd], all clamped to the list. The focused row is taken as the first visible row, and the visible span as numVisibleRows from it; bufferRows more on each side are "near".

is no focused row inside the list

Parameters:
NameTypeDescription
focusedRowdynamic

index of the focused row

numVisibleRowsinteger

rows the list shows at once

totalRowsinteger

rows in the list

bufferRowsinteger

rows kept near on each side of the visible span

Returns:

[bufferStart, visibleStart, visibleEnd, bufferEnd], or [-1, -1, -1, -1] when there

Type: 
object