Class: TouchList
Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/List/TouchList.tsx:47
A touchscreen list which can be vertically scrolled by clicking and dragging the mouse.
Extends
DisplayComponent
<TouchListProps
>
Constructors
Constructor
new TouchList(
props
):TouchList
Defined in: sdk/components/FSComponent.ts:73
Creates an instance of a DisplayComponent.
Parameters
Parameter | Type | Description |
---|---|---|
props | TouchListProps | The propertis of the component. |
Returns
TouchList
Inherited from
DisplayComponent<TouchListProps>.constructor
Properties
context?
optional
context: [] =undefined
Defined in: sdk/components/FSComponent.ts:64
The context on this component, if any.
Inherited from
DisplayComponent.context
contextType?
readonly
optional
contextType: readonly [] =undefined
Defined in: sdk/components/FSComponent.ts:67
The type of context for this component, if any.
Inherited from
DisplayComponent.contextType
heightPx
readonly
heightPx:Subscribable
<number
>
Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/List/TouchList.tsx:66
The visible height of this list, in pixels.
itemsPerPage
readonly
itemsPerPage:undefined
|Subscribable
<number
>
Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/List/TouchList.tsx:54
The number of visible list items per page displayed by this list, or undefined
if the number of items per page
is not prescribed.
listItemHeightWithMarginPx
readonly
listItemHeightWithMarginPx:Subscribable
<number
>
Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/List/TouchList.tsx:58
The height, in pixels, of one item in this list plus its bottom margin.
props
props:
TouchListProps
&ComponentProps
Defined in: sdk/components/FSComponent.ts:61
The properties of the component.
Inherited from
DisplayComponent.props
renderWindow
readonly
renderWindow:Subscribable
<Readonly
<Omit
<Float64Array
,"set"
|"sort"
|"copyWithin"
>>>
Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/List/TouchList.tsx:94
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.
scrollBarHeightPercentage
readonly
scrollBarHeightPercentage:Subscribable
<number
>
Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/List/TouchList.tsx:84
The fraction of this list's visible height compared to the total height of all items in the list plus their margins.
scrollPercentage
readonly
scrollPercentage:Subscribable
<number
>
Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/List/TouchList.tsx:80
This list's current scroll position, normalized such that 0 represents when the list is scrolled to the top (without overscroll) and 1 represents when the list is scrolled to the bottom (without overscroll).
scrollY
readonly
scrollY:Subscribable
<number
>
Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/List/TouchList.tsx:73
This list's current scroll position, in pixels. The scroll position is zero when the list is scrolled to the top (without overscroll) and increases as the list is scrolled down.
topVisibleIndex
readonly
topVisibleIndex:Subscribable
<number
>
Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/List/TouchList.tsx:87
totalHeightPx
readonly
totalHeightPx:Subscribable
<number
>
Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/List/TouchList.tsx:62
The total height, in pixels, of all items in this list plus their margins.
Methods
destroy()
destroy():
void
Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/List/TouchList.tsx:174
Returns
void
Inherit Doc
Overrides
DisplayComponent.destroy
getContainerRef()
getContainerRef():
HTMLDivElement
Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/List/TouchList.tsx:114
Returns a reference to the element where the list items should be added.
Returns
HTMLDivElement
A reference to the element where the list items should be added.
getContext()
protected
getContext(context
):never
Defined in: sdk/components/FSComponent.ts:106
Gets a context data subscription from the context collection.
Parameters
Parameter | Type | Description |
---|---|---|
context | never | The 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
onAfterRender()
onAfterRender():
void
Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/List/TouchList.tsx:97
Returns
void
Inherit Doc
Overrides
DisplayComponent.onAfterRender
onBeforeRender()
onBeforeRender():
void
Defined in: sdk/components/FSComponent.ts:80
A callback that is called before the component is rendered.
Returns
void
Inherited from
DisplayComponent.onBeforeRender
pageDown()
pageDown():
void
Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/List/TouchList.tsx:128
Scrolls down by one full page height.
Returns
void
pageUp()
pageUp():
void
Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/List/TouchList.tsx:121
Scrolls up by one full page height.
Returns
void
render()
render():
VNode
Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/List/TouchList.tsx:156
Returns
VNode
Inherit Doc
Overrides
DisplayComponent.render
scrollToIndex()
scrollToIndex(
index
,position
,animate
):void
Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/List/TouchList.tsx:141
Scrolls until the item at a specified index is in view.
Parameters
Parameter | Type | Description |
---|---|---|
index | number | The index of the item to which to scroll. |
position | number | The position to place the target item at the end of the scroll. Position 0 is the top-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. If this value is negative, the target item will be placed at the visible position that results in the shortest scroll distance. Ignored if this list does not support snapping to list items. |
animate | boolean | Whether to animate the scroll. |
Returns
void