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.
| Name | Type | Description |
|---|---|---|
key | string | "left" or "right" |
rowItemFocused | dynamic | RowList rowItemFocused field ([rowIndex, itemIndex] array) |
content | dynamic | RowList content node tree |
rowItemSize | dynamic | RowList rowItemSize field (flat [w,h] or array-of-pairs [[w,h],...]) |
rowItemSpacing | dynamic | RowList rowItemSpacing field (flat [x,y] or nested [[x,y]]) |
focusXOffset | dynamic | RowList focusXOffset field (array like [96] or empty []) |
itemSize | dynamic | RowList itemSize field ([containerWidth, containerHeight]) |
[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).
| Name | Type | Description |
|---|---|---|
key | string | The key pressed |
press | boolean | Whether this is a key press (true) or release (false) |
true if the wrap was handled, false to let native RowList handle navigation
- Type:
- boolean