Methods
(static) buildSearchOrder(preferred) → {object}
buildSearchOrder: Returns an array of slot indices starting with preferred and spiraling outward. Used to find the nearest interactive slot when the preferred one is static or hidden.
preferred=0 -> [0, 1, 2] (try left, then center, then right) preferred=1 -> [1, 0, 2] (try center, then left, then right) preferred=2 -> [2, 1, 0] (try right, then center, then left)
The returned array always covers all three slots, so callers can iterate it and stop at the first interactive candidate without having to fall through to a separate "fallback" branch.
Parameters:
| Name | Type | Description |
|---|---|---|
preferred | integer |
Returns:
- Type:
- object