Methods

(static) getWrapTarget(key, rowItemFocused, content, rowItemSize, rowItemSpacing, focusXOffset, itemSize) → {object}

Pure calculation: determines the wrap target for a short-row boundary navigation. Returns [rowIndex, targetItemIndex] if wrap should occur, or invalid if native RowList should handle it.

Parameters:
NameTypeDescription
keystring

"left" or "right"

rowItemFocuseddynamic

RowList rowItemFocused field ([rowIndex, itemIndex] array)

contentdynamic

RowList content node tree

rowItemSizedynamic

RowList rowItemSize field (flat [w,h] or array-of-pairs [[w,h],...])

rowItemSpacingdynamic

RowList rowItemSpacing field (flat [x,y] or nested [[x,y]])

focusXOffsetdynamic

RowList focusXOffset field (array like [96] or empty [])

itemSizedynamic

RowList itemSize field ([containerWidth, containerHeight])

Returns:

[rowIndex, targetItemIndex] or invalid

Type: 
object

(static) wrapRowFocus(key, press) → {boolean}

Wraps focus to the opposite end of a short row when the user navigates past the boundary. Short rows (where all items fit on screen) don't trigger native fixedFocusWrap behavior, so this function manually handles the wrap via jumpToRowItem. Must be called from a component scope where m.top is a RowList (or extension of one).

Parameters:
NameTypeDescription
keystring

The key pressed

pressboolean

Whether this is a key press (true) or release (false)

Returns:

true if the wrap was handled, false to let native RowList handle navigation

Type: 
boolean