Skip to main content

Class: UiTouchSlider<S>

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchSlider/UiTouchSlider.tsx:120

A G3X Touch UI version of TouchSlider. Supports UI focus, enables focus on drag and lock focus on drag by default.

The root element of the slider conditionally contains the ui-slider-focused CSS class when the slider has UI focus.

Extends​

Type Parameters​

Type Parameter
S extends Subscribable<number> | MutableSubscribable<number>

Implements​

Constructors​

Constructor​

new UiTouchSlider<S>(props): UiTouchSlider<S>

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

Creates an instance of a DisplayComponent.

Parameters​

ParameterTypeDescription
propsUiTouchSliderPropsThe propertis of the component.

Returns​

UiTouchSlider<S>

Inherited from​

DisplayComponent.constructor

Properties​

canBeFocused​

readonly canBeFocused: Subscribable<boolean>

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchSlider/UiTouchSlider.tsx:138

Whether this component can be focused.

Implementation of​

UiFocusableComponent.canBeFocused


context?​

optional context: [] = undefined

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

The context on this component, if any.

Inherited from​

DisplayComponent.context


contextType?​

readonly optional contextType: readonly [] = undefined

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

The type of context for this component, if any.

Inherited from​

DisplayComponent.contextType


focusModule​

protected readonly focusModule: UiTouchSliderFocusModule

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchSlider/UiTouchSlider.tsx:128


isUiFocusableComponent​

readonly isUiFocusableComponent: true = true

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchSlider/UiTouchSlider.tsx:124

Flags this component as a UiFocusableComponent.

Implementation of​

UiFocusableComponent.isUiFocusableComponent


props​

props: UiTouchSliderProps<S> & ComponentProps

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

The properties of the component.

Inherited from​

DisplayComponent.props


sliderRef​

protected readonly sliderRef: NodeReference<TouchSlider<S, TouchSliderProps<S>>>

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchSlider/UiTouchSlider.tsx:126

Methods​

destroy()​

destroy(): void

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchSlider/UiTouchSlider.tsx:260

Destroys this component.

Returns​

void

Overrides​

DisplayComponent.destroy


focusSelf()​

focusSelf(): void

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchSlider/UiTouchSlider.tsx:150

Attempts to set focus on this slider.

Returns​

void


getContext()​

protected getContext(context): never

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

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


onAfterRender()​

onAfterRender(): void

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchSlider/UiTouchSlider.tsx:143

A callback that is called after the component is rendered.

Returns​

void

Overrides​

DisplayComponent.onAfterRender


onBeforeRender()​

onBeforeRender(): void

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

A callback that is called before the component is rendered.

Returns​

void

Inherited from​

DisplayComponent.onBeforeRender


onDeregistered()​

onDeregistered(): void

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchSlider/UiTouchSlider.tsx:160

Responds to when this component is deregistered with a controller.

Returns​

void

Implementation of​

UiFocusableComponent.onDeregistered


onDragEnded()​

protected onDragEnded(position, initialPosition): void

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchSlider/UiTouchSlider.tsx:221

Responds to when a mouse drag is released on this slider.

Parameters​

ParameterTypeDescription
positionReadonlyFloat64ArrayThe current position of the mouse.
initialPositionReadonlyFloat64ArrayThe position of the mouse at the start of the drag motion.

Returns​

void


onDragMoved()​

protected onDragMoved(position, prevPosition, initialPosition): void

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

Responds to when this slider is dragged.

Parameters​

ParameterTypeDescription
positionReadonlyFloat64ArrayThe current mouse position.
prevPositionReadonlyFloat64ArrayThe position of the mouse at the previous update.
initialPositionReadonlyFloat64ArrayThe position of the mouse at the start of the current drag motion.

Returns​

void


onDragStarted()​

protected onDragStarted(position): void

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchSlider/UiTouchSlider.tsx:198

Responds to when a mouse drag is started on this slider.

Parameters​

ParameterTypeDescription
positionReadonlyFloat64ArrayThe current mouse position.

Returns​

void


onFocusGained()​

onFocusGained(direction): void

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchSlider/UiTouchSlider.tsx:165

Responds to when this component gains focus.

Parameters​

ParameterTypeDescription
directionUiFocusDirectionThe direction from which focus was gained.

Returns​

void

Implementation of​

UiFocusableComponent.onFocusGained


onFocusLost()​

onFocusLost(): void

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchSlider/UiTouchSlider.tsx:171

Responds to when this component loses focus.

Returns​

void

Implementation of​

UiFocusableComponent.onFocusLost


onRegistered()​

onRegistered(controller): void

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchSlider/UiTouchSlider.tsx:155

Responds to when this component is registered with a controller.

Parameters​

ParameterTypeDescription
controllerUiFocusControllerThe controller with which this component was registered.

Returns​

void

Implementation of​

UiFocusableComponent.onRegistered


onUiInteractionEvent()​

onUiInteractionEvent(event): boolean

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchSlider/UiTouchSlider.tsx:177

Handles a UiInteractionEvent.

Parameters​

ParameterTypeDescription
eventUiInteractionEventThe event to handle.

Returns​

boolean

Whether the event was handled.

Implementation of​

UiFocusableComponent.onUiInteractionEvent


onValueChanged()​

protected onValueChanged(value, state): void

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchSlider/UiTouchSlider.tsx:186

Responds to when this slider's value changes from user input.

Parameters​

ParameterTypeDescription
valuenumberThe new slider value.
stateSThe slider's bound state.

Returns​

void


render()​

render(): VNode

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TouchSlider/UiTouchSlider.tsx:226

Renders the component.

Returns​

VNode

A JSX element to be rendered.

Overrides​

DisplayComponent.render