Skip to main content

Class: UiNearestWaypointList<DataType>

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/Nearest/UiNearestWaypointList.tsx:33

A scrollable UI list of nearest waypoints.

Extends​

Type Parameters​

Type ParameterDefault type
DataType extends NearestWaypointEntry<Waypoint> & DynamicListDataNearestWaypointEntry<Waypoint> & DynamicListData

Implements​

Constructors​

Constructor​

new UiNearestWaypointList<DataType>(props): UiNearestWaypointList<DataType>

Defined in: src/sdk/components/FSComponent.ts:73

Creates an instance of a DisplayComponent.

Parameters​

ParameterTypeDescription
propsUiNearestWaypointListPropsThe propertis of the component.

Returns​

UiNearestWaypointList<DataType>

Inherited from​

DisplayComponent<UiNearestWaypointListProps<DataType>>.constructor

Properties​

context?​

optional context: [] = undefined

Defined in: src/sdk/components/FSComponent.ts:64

The context on this component, if any.

Inherited from​

DisplayComponent.context


contextType?​

readonly optional contextType: readonly [] = undefined

Defined in: src/sdk/components/FSComponent.ts:67

The type of context for this component, if any.

Inherited from​

DisplayComponent.contextType


props​

props: UiNearestWaypointListProps<DataType> & ComponentProps

Defined in: src/sdk/components/FSComponent.ts:61

The properties of the component.

Inherited from​

DisplayComponent.props

Accessors​

itemCount​

Get Signature​

get itemCount(): Subscribable<number>

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/Nearest/UiNearestWaypointList.tsx:45

The total number of items in this list, including hidden items.

Returns​

Subscribable<number>


knobLabelState​

Get Signature​

get knobLabelState(): SubscribableMap<UiKnobId, string> & Subscribable<UiKnobRequestedLabelState>

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/Nearest/UiNearestWaypointList.tsx:66

The bezel rotary knob label state requested by this list.

Returns​

SubscribableMap<UiKnobId, string> & Subscribable<UiKnobRequestedLabelState>


renderWindow​

Get Signature​

get renderWindow(): Subscribable<Readonly<Omit<Float64Array, "set" | "sort" | "copyWithin">>>

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/Nearest/UiNearestWaypointList.tsx:60

The window of rendered list items, as [startIndex, endIndex], where startIndex is the index of the first rendered item, inclusive, and endIndex is the index of the last rendered item, exclusive.

Returns​

Subscribable<Readonly<Omit<Float64Array, "set" | "sort" | "copyWithin">>>


visibleItemCount​

Get Signature​

get visibleItemCount(): Subscribable<number>

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/Nearest/UiNearestWaypointList.tsx:51

The total number of visible items in this list.

Returns​

Subscribable<number>

Methods​

clearRecentFocus()​

clearRecentFocus(): void

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/Nearest/UiNearestWaypointList.tsx:306

Clears this list's memory of the most recently focused item. Has no effect if an item is currently focused.

Returns​

void


destroy()​

destroy(): void

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/Nearest/UiNearestWaypointList.tsx:373

Returns​

void

Inherit Doc​

Overrides​

DisplayComponent.destroy


focusFirst()​

focusFirst(focusDirection?): void

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/Nearest/UiNearestWaypointList.tsx:276

Focuses the first focusable item in this list.

Parameters​

ParameterTypeDescription
focusDirection?UiFocusDirectionThe direction from which to focus the item. Defaults to UiFocusDirection.Unspecified.

Returns​

void


focusIndex()​

focusIndex(index, focusDirection?): void

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/Nearest/UiNearestWaypointList.tsx:222

Focuses an item at a specified index in this list.

Parameters​

ParameterTypeDescription
indexnumberThe index of the item to focus, after sorting has been applied and hidden items have been excluded. If the index is out of bounds, then focus will not be set.
focusDirection?UiFocusDirectionThe direction from which to focus the item. Defaults to UiFocusDirection.Unspecified.

Returns​

void


focusItem()​

focusItem(item, focusDirection?): void

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/Nearest/UiNearestWaypointList.tsx:268

Focuses an item in this list. If this is a static list, then this method does nothing.

Parameters​

ParameterTypeDescription
itemDataTypeThe item to focus.
focusDirection?UiFocusDirectionThe direction from which to focus the item. Defaults to UiFocusDirection.Unspecified.

Returns​

void


focusLast()​

focusLast(focusDirection?): void

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/Nearest/UiNearestWaypointList.tsx:284

Focuses the last focusable item in this list.

Parameters​

ParameterTypeDescription
focusDirection?UiFocusDirectionThe direction from which to focus the item. Defaults to UiFocusDirection.Unspecified.

Returns​

void


focusRecent()​

focusRecent(): void

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/Nearest/UiNearestWaypointList.tsx:292

Focuses the most recently focused item in this list. Has no effect if an item is currently focused or if there is no most recently focused item.

Returns​

void


getContext()​

protected getContext(context): never

Defined in: src/sdk/components/FSComponent.ts:106

Gets a context data subscription from the context collection.

Parameters​

ParameterTypeDescription
contextneverThe context to get the subscription for.

Returns​

never

The requested context.

Throws​

An error if no data for the specified context type could be found.

Inherited from​

DisplayComponent.getContext


getFocusedIndex()​

getFocusedIndex(): number

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/Nearest/UiNearestWaypointList.tsx:212

Gets the index of this list's focused item after sorting has been applied and hidden items have been excluded.

Returns​

number

The index of this list's focused item after sorting has been applied and hidden items have been excluded, or -1 if no item is focused.


indexOfSortedIndex()​

indexOfSortedIndex(sortedIndex): number

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/Nearest/UiNearestWaypointList.tsx:134

Gets the data item index of a sorted index. If this list does not support dynamic data or has not been rendered, then this method will return -1.

Parameters​

ParameterTypeDescription
sortedIndexnumberA sorted index.

Returns​

number

The index of the data item that is sorted to the specified index, or -1 if the sorted index is out of bounds, this list does not support dynamic data, or this list has not been rendered.


indexOfSortedVisibleIndex()​

indexOfSortedVisibleIndex(sortedVisibleIndex): number

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/Nearest/UiNearestWaypointList.tsx:146

Gets the data item index of a sorted index after hidden items have been excluded. If this list does not support dynamic data or has not been rendered, then this method will return -1.

Parameters​

ParameterTypeDescription
sortedVisibleIndexnumberA sorted index after hidden items have been excluded.

Returns​

number

The index of the data item that is sorted to the specified index after hidden items have been excluded, or -1 if the sorted index is out of bounds, this list does not support dynamic data, or this list has not been rendered.


onAfterRender()​

onAfterRender(): void

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/Nearest/UiNearestWaypointList.tsx:73

Returns​

void

Inherit Doc​

Overrides​

DisplayComponent.onAfterRender


onBeforeRender()​

onBeforeRender(): void

Defined in: src/sdk/components/FSComponent.ts:80

A callback that is called before the component is rendered.

Returns​

void

Inherited from​

DisplayComponent.onBeforeRender


onUiInteractionEvent()​

onUiInteractionEvent(event): boolean

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/Nearest/UiNearestWaypointList.tsx:318

Handles a UiInteractionEvent.

Parameters​

ParameterTypeDescription
eventUiInteractionEventThe event to handle.

Returns​

boolean

Whether the event was handled.

Implementation of​

UiInteractionHandler.onUiInteractionEvent


removeFocus()​

removeFocus(): void

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/Nearest/UiNearestWaypointList.tsx:299

Removes focus from the currently focused item in this list.

Returns​

void


render()​

render(): VNode

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/Nearest/UiNearestWaypointList.tsx:323

Returns​

VNode

Inherit Doc​

Overrides​

DisplayComponent.render


scrollToIndex()​

scrollToIndex(index, position, focus, animate, skipScrollIfItemInView, focusDirection?): void

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/Nearest/UiNearestWaypointList.tsx:166

Scrolls until the item at a specified index is in view.

Parameters​

ParameterTypeDefault valueDescription
indexnumberundefinedThe index of the item to which to scroll, after sorting has been applied and hidden items have been excluded.
positionnumberundefinedThe position to place the target item at the end of the scroll. Position 0 is the top/left-most visible slot, position 1 is the next slot, and so on. Values greater than or equal to the number of visible items per page will be clamped. Negative values will be interpreted as counting backwards from the bottom/right-most visible slot starting with -1. Ignored if this list does not support snapping to list items.
focusbooleanundefinedWhether to focus the item to which to scroll.
animatebooleanundefinedWhether to animate the scroll.
skipScrollIfItemInViewbooleanfalseWhether to skip the scroll operation if the target item is already in view or will be in view when the current scrolling animation finishes. The target item will still be focused if focus is true even if the scroll operation is skipped. Defaults to false.
focusDirection?UiFocusDirectionundefinedThe direction from which to focus the item to which to scroll. Ignored if focus is false. Defaults to UiFocusDirection.Unspecified.

Returns​

void


scrollToIndexWithMargin()​

scrollToIndexWithMargin(index, margin, focus, animate, skipScrollIfItemInView, focusDirection?): void

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/Nearest/UiNearestWaypointList.tsx:196

Scrolls the minimum possible distance until the item at a specified index is in view with a given margin from the edges of the visible list.

Parameters​

ParameterTypeDefault valueDescription
indexnumberundefinedThe index of the item to which to scroll, after sorting has been applied and hidden items have been excluded.
marginnumberundefinedThe margin from the edges of the visible list to respect when scrolling to the target item. In other words, the scrolling operation will attempt to place the target item at least as far from the edges of the visible list as the specified margin. If this list supports snapping to items, then the margin should be expressed as an item count. If this list does not support snapping to items, then the margin should be expressed as pixels. The margin will be clamped between zero and the largest possible value such that an item can be placed within the visible list while respecting the margin value on both sides.
focusbooleanundefinedWhether to focus the item to which to scroll.
animatebooleanundefinedWhether to animate the scroll.
skipScrollIfItemInViewbooleanfalseWhether to skip the scroll operation if the target item is already in view or will be in view when the current scrolling animation finishes. The target item will still be focused if focus is true even if the scroll operation is skipped. Defaults to false.
focusDirection?UiFocusDirectionundefinedThe direction from which to focus the item to which to scroll. Ignored if focus is false. Defaults to UiFocusDirection.Unspecified.

Returns​

void


scrollToItem()​

scrollToItem(item, position, focus, animate, skipScrollIfItemInView): void

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/Nearest/UiNearestWaypointList.tsx:239

Scrolls until the specified item is in view. If this is a static list, then this method does nothing.

Parameters​

ParameterTypeDefault valueDescription
itemDataTypeundefinedThe item to which to scroll.
positionnumberundefinedThe position to place the target item at the end of the scroll. Position 0 is the top/left-most visible slot, position 1 is the next slot, and so on. Values greater than or equal to the number of visible items per page will be clamped. Negative values will be interpreted as counting backwards from the bottom/right-most visible slot starting with -1. Ignored if this list does not support snapping to list items.
focusbooleanundefinedWhether to focus the item to which to scroll.
animatebooleanundefinedWhether to animate the scroll.
skipScrollIfItemInViewbooleanfalseWhether to skip the scroll operation if the target item is already in view. The target item will still be focused if focus is true even if the scroll operation is skipped. Defaults to false.

Returns​

void


scrollToItemWithMargin()​

scrollToItemWithMargin(item, margin, focus, animate, skipScrollIfItemInView): void

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/Nearest/UiNearestWaypointList.tsx:259

Scrolls the minimum possible distance until the specified item is in view with a given margin from the edges of the visible list. If this is a static list, then this method does nothing.

Parameters​

ParameterTypeDefault valueDescription
itemDataTypeundefinedThe item to which to scroll.
marginnumberundefinedThe margin from the edges of the visible list to respect when scrolling to the target item. In other words, the scrolling operation will attempt to place the target item at least as far from the edges of the visible list as the specified margin. If this list supports snapping to items, then the margin should be expressed as an item count. If this list does not support snapping to items, then the margin should be expressed as pixels. The margin will be clamped between zero and the largest possible value such that an item can be placed within the visible list while respecting the margin value on both sides.
focusbooleanundefinedWhether to focus the item to which to scroll.
animatebooleanundefinedWhether to animate the scroll.
skipScrollIfItemInViewbooleanfalseWhether to skip the scroll operation if the target item is already in view. The target item will still be focused if focus is true even if the scroll operation is skipped. Defaults to false.

Returns​

void


sortedIndexOfData()​

sortedIndexOfData(data): number

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/Nearest/UiNearestWaypointList.tsx:99

Gets the sorted index of a data item. If this list does not support dynamic data or has not been rendered, then this method will return -1.

Parameters​

ParameterTypeDescription
dataDataTypeA data item.

Returns​

number

The index to which the specified data item is sorted, or -1 if the item is not in this list, this list does not support dynamic data, or this list has not been rendered.


sortedIndexOfIndex()​

sortedIndexOfIndex(index): number

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/Nearest/UiNearestWaypointList.tsx:88

Gets the sorted index of a data item index. If this list does not support dynamic data or has not been rendered, then this method will return -1.

Parameters​

ParameterTypeDescription
indexnumberA data item index.

Returns​

number

The index to which the specified data item index is sorted, or -1 if the data index is out of bounds, this list does not support dynamic data, or this list has not been rendered.


sortedVisibleIndexOfData()​

sortedVisibleIndexOfData(data): number

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/Nearest/UiNearestWaypointList.tsx:123

Gets the sorted index of a data item after hidden items have been excluded. If this list does not support dynamic data or has not been rendered, then this method will return -1.

Parameters​

ParameterTypeDescription
dataDataTypeA data item.

Returns​

number

The index to which the specified data item is sorted after hidden items have been excluded, or -1 if the item is not in this list, the item is itself hidden, this list does not support dynamic data, or this list has not been rendered.


sortedVisibleIndexOfIndex()​

sortedVisibleIndexOfIndex(index): number

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/Nearest/UiNearestWaypointList.tsx:111

Gets the sorted index of a data item index after hidden items have been excluded. If this list does not support dynamic data or has not been rendered, then this method will return -1.

Parameters​

ParameterTypeDescription
indexnumberA data item index.

Returns​

number

The index to which the specified data item index is sorted after hidden items have been excluded, or -1 if the data index is out of bounds, the data item whose index was given is itself hidden, this list does not support dynamic data, or this list has not been rendered.


updateOrder()​

updateOrder(): void

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/Nearest/UiNearestWaypointList.tsx:313

Updates the order of rendered items in this list.

Returns​

void