Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/NoriginMedia/Norigin-Spatial-Navigation
/ functions
Functions
73 in github.com/NoriginMedia/Norigin-Spatial-Navigation
⨍
Functions
73
◇
Types & classes
24
↓ 40 callers
Method
getCurrentFocusKey
* Returns the current focus key
src/SpatialNavigation.ts:1175
↓ 33 callers
Method
log
(functionName: string, debugString: string, ...rest: any[])
src/SpatialNavigation.ts:1158
↓ 23 callers
Method
navigateByDirection
* Move focus by direction, if you can't use buttons or focusing by key. * * @example * navigateByDirection('right') // The focus is moved to
src/SpatialNavigation.ts:962
↓ 14 callers
Method
setFocus
(focusKey: string, focusDetails: FocusDetails = {})
src/SpatialNavigation.ts:1646
↓ 8 callers
Function
createHorizontalLayout
()
src/__tests__/domNodes.ts:45
↓ 7 callers
Method
addFocusable
({ focusKey, node, parentFocusKey, onEnterPress, onEnterRelease, onArrowPress, onA
src/SpatialNavigation.ts:1303
↓ 6 callers
Method
updateLayout
(focusKey: string)
src/SpatialNavigation.ts:1685
↓ 4 callers
Method
drawPoint
(x: number, y: number, color = 'blue', size = 10)
src/VisualDebugger.ts:126
↓ 4 callers
Method
getNodeLayoutByFocusKey
(focusKey: string)
src/SpatialNavigation.ts:1464
↓ 4 callers
Method
isParticipatingFocusableComponent
* Checks whether the focusableComponent is actually participating in spatial navigation (in other words, is a * 'focusable' focusableComponent). Se
src/SpatialNavigation.ts:1607
↓ 3 callers
Method
getKeyMap
()
src/SpatialNavigation.ts:1588
↓ 3 callers
Method
getRefCorners
* Returns two corners (a and b) coordinates that are used as a reference points * Where "a" is always leftmost and topmost corner, and "b" is right
src/SpatialNavigation.ts:299
↓ 3 callers
Method
isFocusableComponent
(focusKey: string)
src/SpatialNavigation.ts:1599
↓ 2 callers
Method
bindEventHandlers
()
src/SpatialNavigation.ts:756
↓ 2 callers
Method
createCanvas
( id: string, zIndex: string, writingDirection: WritingDirection )
src/VisualDebugger.ts:41
↓ 2 callers
Function
createRootNode
()
src/__tests__/domNodes.ts:3
↓ 2 callers
Function
createVerticalLayout
()
src/__tests__/domNodes.ts:169
↓ 2 callers
Method
getCutoffCoordinate
* Used to determine the coordinate that will be used to filter items that are over the "edge"
src/SpatialNavigation.ts:267
↓ 2 callers
Method
getEventType
(keyCode: number | string)
src/SpatialNavigation.ts:748
↓ 2 callers
Method
getForcedFocusKey
* Returns the focus key to which focus can be forced if there are force-focusable components. * A component closest to the top left viewport corner
src/SpatialNavigation.ts:1183
↓ 2 callers
Method
getKeyCode
(event: KeyboardEvent)
src/SpatialNavigation.ts:752
↓ 2 callers
Function
getRect
(node: HTMLElement)
src/measureLayout.ts:3
↓ 2 callers
Function
measureLayout
(node: HTMLElement)
src/measureLayout.ts:24
↓ 2 callers
Method
pause
()
src/SpatialNavigation.ts:1638
↓ 2 callers
Method
removeFocusable
({ focusKey }: FocusableComponentRemovePayload)
src/SpatialNavigation.ts:1406
↓ 2 callers
Method
smartNavigate
* This function navigates between siblings OR goes up by the Tree * Based on the Direction
src/SpatialNavigation.ts:990
↓ 2 callers
Method
sortSiblingsByPriority
* Inspired by: https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS_for_TV/TV_remote_control_navigation#Algorithm_design * Ref Corners are t
src/SpatialNavigation.ts:499
↓ 2 callers
Method
unbindEventHandlers
()
src/SpatialNavigation.ts:855
↓ 2 callers
Method
updateFocusable
( focusKey: string, { node, preferredChildFocusKey, focusable, isFocusBoundary
src/SpatialNavigation.ts:1704
↓ 2 callers
Method
updateParentsHasFocusedChild
(focusKey: string, focusDetails: FocusDetails)
src/SpatialNavigation.ts:1514
↓ 2 callers
Method
updateParentsLastFocusedChild
(focusKey: string)
src/SpatialNavigation.ts:1566
↓ 1 callers
Method
clear
()
src/VisualDebugger.ts:70
↓ 1 callers
Method
clearLayouts
()
src/VisualDebugger.ts:78
↓ 1 callers
Method
drawLayout
(layout: NodeLayout, focusKey: string, parentFocusKey: string)
src/VisualDebugger.ts:86
↓ 1 callers
Function
getBoundingClientRect
(node: HTMLElement)
src/measureLayout.ts:63
↓ 1 callers
Function
getBoundingClientRect
()
src/__tests__/measureLayout.test.ts:40
↓ 1 callers
Function
getChildClosestToOrigin
( children: FocusableComponent[], writingDirection: WritingDirection )
src/SpatialNavigation.ts:153
↓ 1 callers
Method
getNextFocusKey
* This function tries to determine the next component to Focus * It's either the target node OR the one down by the Tree if node has children compo
src/SpatialNavigation.ts:1218
↓ 1 callers
Method
isAdjacentSlice
* Calculates if the sibling node is intersecting enough with the ref node by the secondary coordinate
src/SpatialNavigation.ts:390
↓ 1 callers
Function
normalizeKeyMap
(keyMap: BackwardsCompatibleKeyMap)
src/SpatialNavigation.ts:173
↓ 1 callers
Method
onArrowPress
(direction: string, keysDetails: KeyPressDetails)
src/SpatialNavigation.ts:914
↓ 1 callers
Method
onArrowRelease
(direction: string)
src/SpatialNavigation.ts:934
↓ 1 callers
Method
onEnterPress
(keysDetails: KeyPressDetails)
src/SpatialNavigation.ts:870
↓ 1 callers
Method
onEnterRelease
()
src/SpatialNavigation.ts:892
↓ 1 callers
Method
onIntermediateNodeBecameBlurred
( focusKey: string, focusDetails: FocusDetails )
src/SpatialNavigation.ts:1626
↓ 1 callers
Method
onIntermediateNodeBecameFocused
( focusKey: string, focusDetails: FocusDetails )
src/SpatialNavigation.ts:1614
↓ 1 callers
Method
saveLastFocusedChildKey
(component: FocusableComponent, focusKey: string)
src/SpatialNavigation.ts:1145
↓ 1 callers
Method
setCurrentFocusedKey
(newFocusKey: string, focusDetails: FocusDetails)
src/SpatialNavigation.ts:1476
↓ 1 callers
Function
useFocusContext
()
src/useFocusContext.ts:8
Function
App
()
src/App.tsx:533
Function
Asset
({ title, color, onEnterPress, onFocus, isShuffleSize, index }: AssetProps)
src/App.tsx:226
Function
Content
()
src/App.tsx:467
Function
ContentRow
({ title: rowTitle, onAssetPress, onFocus, isShuffleSize }: ContentRowProps)
src/App.tsx:293
Function
Menu
({ focusKey: focusKeyParam }: MenuProps)
src/App.tsx:133
Function
MenuItem
()
src/App.tsx:102
Function
ProgressBar
()
src/App.tsx:424
Function
bottom
()
src/measureLayout.ts:43
Method
constructor
(writingDirection: WritingDirection)
src/VisualDebugger.ts:25
Method
constructor
()
src/SpatialNavigation.ts:596
Method
destroy
()
src/SpatialNavigation.ts:732
Method
doesFocusableExist
(focusKey: string)
src/SpatialNavigation.ts:1746
Method
draw
()
src/SpatialNavigation.ts:697
Method
getPrimaryAxisDistance
( refCorners: Corners, siblingCorners: Corners, isVerticalDirection: boolean )
src/SpatialNavigation.ts:416
Method
getSecondaryAxisDistance
( refCorners: Corners, siblingCorners: Corners, isVerticalDirection: boolean, distanceCalculat
src/SpatialNavigation.ts:428
Method
init
({ debug = false, visualDebug = false, nativeMode = false, throttle: throttleParam = 0, th
src/SpatialNavigation.ts:661
Method
isNativeMode
()
src/SpatialNavigation.ts:1742
Method
resume
()
src/SpatialNavigation.ts:1642
Function
right
()
src/measureLayout.ts:40
Method
setKeyMap
(keyMap: BackwardsCompatibleKeyMap)
src/SpatialNavigation.ts:1592
Method
setThrottle
({ throttle: throttleParam = 0, throttleKeypresses = false } = {})
src/SpatialNavigation.ts:717
Method
updateAllLayouts
()
src/SpatialNavigation.ts:1675
Method
updateRtl
* This function updates the writing direction * @param rtl whether the writing direction is right-to-left
src/SpatialNavigation.ts:1754
Function
useFocusableHook
({ focusable = true, saveLastFocusedChild = true, trackChildren = false, autoRestoreFocus = true, fo
src/useFocusable.ts:77