Skip to main content

Class: UiInteractionUtils

A utility class for working with UI interaction events.

Constructors

constructor

new UiInteractionUtils(): UiInteractionUtils

Returns

UiInteractionUtils

Properties

KNOB_EVENT_TO_KNOB_ID

Static Readonly KNOB_EVENT_TO_KNOB_ID: Object

Type declaration

NameType
LeftKnobInnerDecLeftInner
LeftKnobInnerIncLeftInner
LeftKnobOuterDecLeftOuter
LeftKnobOuterIncLeftOuter
LeftKnobPressLeftInnerPush
LeftKnobPressLongLeftInnerPush
RightKnobInnerDecRightInner
RightKnobInnerIncRightInner
RightKnobOuterDecRightOuter
RightKnobOuterIncRightOuter
RightKnobPressRightInnerPush
RightKnobPressLongRightInnerPush
SingleKnobInnerDecSingleInner
SingleKnobInnerIncSingleInner
SingleKnobOuterDecSingleOuter
SingleKnobOuterIncSingleOuter
SingleKnobPressSingleInnerPush
SingleKnobPressLongSingleInnerPush

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/UiSystem/UiInteractionUtils.ts:8

Methods

getKnobTurnDirection

getKnobTurnDirection(event): 1 | -1

Gets the turn direction for a bezel rotary knob turn event.

Parameters

NameTypeDescription
eventUiKnobTurnInteractionEventThe event for which to get the turn direction.

Returns

1 | -1

The turn direction for the specified bezel rotary knob turn event.

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/UiSystem/UiInteractionUtils.ts:51


isKnobEvent

isKnobEvent(event): event is UiKnobInteractionEvent

Checks if an interaction event originated from a bezel rotary knob.

Parameters

NameTypeDescription
eventUiInteractionEventThe event to check.

Returns

event is UiKnobInteractionEvent

Whether the specified event originated from a bezel rotary knob.

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/UiSystem/UiInteractionUtils.ts:42