Skip to content

Class: InteractionBase โ€‹

Hierarchy โ€‹

Implements โ€‹

Table of contents โ€‹

Constructors โ€‹

Properties โ€‹

Accessors โ€‹

Methods โ€‹

Constructors โ€‹

constructor โ€‹

โ€ข new InteractionBase(target, canvas, selector, userConfig?): InteractionBase

Parameters โ€‹

NameType
targetILeaf
canvasIInteractionCanvas
selectorISelector
userConfig?IInteractionConfig

Returns โ€‹

InteractionBase

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:72

Properties โ€‹

target โ€‹

โ€ข target: ILeaf

Implementation of โ€‹

IInteraction.target

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:18


canvas โ€‹

โ€ข canvas: IInteractionCanvas

Implementation of โ€‹

IInteraction.canvas

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:19


selector โ€‹

โ€ข selector: ISelector

Implementation of โ€‹

IInteraction.selector

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:20


running โ€‹

โ€ข running: boolean

Implementation of โ€‹

IInteraction.running

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:22


config โ€‹

โ€ข config: IInteractionConfig

Implementation of โ€‹

IInteraction.config

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:36


cursor โ€‹

โ€ข cursor: ICursorType | ICursorType[]

Implementation of โ€‹

IInteraction.cursor

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:40


bottomList โ€‹

โ€ข Optional bottomList: IPickBottom[]

Implementation of โ€‹

IInteraction.bottomList

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:43


shrinkCanvasBounds โ€‹

โ€ข shrinkCanvasBounds: IBounds

Implementation of โ€‹

IInteraction.shrinkCanvasBounds

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:45


downData โ€‹

โ€ข downData: IPointerEvent

Implementation of โ€‹

IInteraction.downData

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:47


hoverData โ€‹

โ€ข hoverData: IPointerEvent

Implementation of โ€‹

IInteraction.hoverData

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:48


focusData โ€‹

โ€ข focusData: ILeaf

Implementation of โ€‹

IInteraction.focusData

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:49


downTime โ€‹

โ€ข downTime: number

Implementation of โ€‹

IInteraction.downTime

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:51


overPath โ€‹

โ€ข Protected overPath: LeafList

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:53


enterPath โ€‹

โ€ข Protected enterPath: LeafList

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:54


waitMenuTap โ€‹

โ€ข Protected waitMenuTap: boolean

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:56


waitRightTap โ€‹

โ€ข Protected waitRightTap: boolean

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:57


waitTap โ€‹

โ€ข Protected waitTap: boolean

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:58


longPressTimer โ€‹

โ€ข Protected longPressTimer: any

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:59


longPressed โ€‹

โ€ข Protected longPressed: boolean

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:60


tapCount โ€‹

โ€ข Protected tapCount: number = 0

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:61


tapTimer โ€‹

โ€ข Protected tapTimer: any

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:62


dragger โ€‹

โ€ข Protected dragger: Dragger

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:64


transformer โ€‹

โ€ข Protected transformer: Transformer

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:65


__eventIds โ€‹

โ€ข Protected __eventIds: IEventListenerId[]

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:67


defaultPath โ€‹

โ€ข Protected defaultPath: ILeafList

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:68


downKeyMap โ€‹

โ€ข Protected downKeyMap: IBooleanMap = {}

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:70

Accessors โ€‹

dragging โ€‹

โ€ข get dragging(): boolean

Returns โ€‹

boolean

Implementation of โ€‹

IInteraction.dragging

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:24


transforming โ€‹

โ€ข get transforming(): boolean

Returns โ€‹

boolean

Implementation of โ€‹

IInteraction.transforming

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:25


moveMode โ€‹

โ€ข get moveMode(): boolean

Returns โ€‹

boolean

Implementation of โ€‹

IInteraction.moveMode

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:27


canHover โ€‹

โ€ข get canHover(): boolean

Returns โ€‹

boolean

Implementation of โ€‹

IInteraction.canHover

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:28


isDragEmpty โ€‹

โ€ข get isDragEmpty(): boolean

Returns โ€‹

boolean

Implementation of โ€‹

IInteraction.isDragEmpty

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:30


isMobileDragEmpty โ€‹

โ€ข get isMobileDragEmpty(): boolean

Returns โ€‹

boolean

Implementation of โ€‹

IInteraction.isMobileDragEmpty

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:31


isHoldMiddleKey โ€‹

โ€ข get isHoldMiddleKey(): boolean

Returns โ€‹

boolean

Implementation of โ€‹

IInteraction.isHoldMiddleKey

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:32


isHoldRightKey โ€‹

โ€ข get isHoldRightKey(): boolean

Returns โ€‹

boolean

Implementation of โ€‹

IInteraction.isHoldRightKey

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:33


isHoldSpaceKey โ€‹

โ€ข get isHoldSpaceKey(): boolean

Returns โ€‹

boolean

Implementation of โ€‹

IInteraction.isHoldSpaceKey

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:34


m โ€‹

โ€ข get m(): IMoveConfig

Returns โ€‹

IMoveConfig

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:37


p โ€‹

โ€ข get p(): IPointerConfig

Returns โ€‹

IPointerConfig

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:38


hitRadius โ€‹

โ€ข get hitRadius(): number

Returns โ€‹

number

Implementation of โ€‹

IInteraction.hitRadius

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:41

Methods โ€‹

start โ€‹

โ–ธ start(): void

Returns โ€‹

void

Implementation of โ€‹

IInteraction.start

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:86


stop โ€‹

โ–ธ stop(): void

Returns โ€‹

void

Implementation of โ€‹

IInteraction.stop

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:90


receive โ€‹

โ–ธ receive(_event): void

Parameters โ€‹

NameType
_eventany

Returns โ€‹

void

Implementation of โ€‹

IInteraction.receive

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:95


pointerDown โ€‹

โ–ธ pointerDown(data?, useDefaultPath?): void

Parameters โ€‹

NameType
data?IPointerEvent
useDefaultPath?boolean

Returns โ€‹

void

Implementation of โ€‹

IInteraction.pointerDown

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:98


pointerMove โ€‹

โ–ธ pointerMove(data?): void

Parameters โ€‹

NameType
data?IPointerEvent

Returns โ€‹

void

Implementation of โ€‹

IInteraction.pointerMove

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:122


pointerMoveReal โ€‹

โ–ธ pointerMoveReal(data): void

Parameters โ€‹

NameType
dataIPointerEvent

Returns โ€‹

void

Implementation of โ€‹

IInteraction.pointerMoveReal

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:136


pointerUp โ€‹

โ–ธ pointerUp(data?): void

Parameters โ€‹

NameType
data?IPointerEvent

Returns โ€‹

void

Implementation of โ€‹

IInteraction.pointerUp

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:167


pointerCancel โ€‹

โ–ธ pointerCancel(): void

Returns โ€‹

void

Implementation of โ€‹

IInteraction.pointerCancel

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:198


multiTouch โ€‹

โ–ธ multiTouch(data, list): void

Parameters โ€‹

NameType
dataIUIEvent
listIKeepTouchData[]

Returns โ€‹

void

Implementation of โ€‹

IInteraction.multiTouch

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:205


โ–ธ menu(data): void

Parameters โ€‹

NameType
dataIPointerEvent

Returns โ€‹

void

Implementation of โ€‹

IInteraction.menu

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:214


โ–ธ menuTap(data): void

Parameters โ€‹

NameType
dataIPointerEvent

Returns โ€‹

void

Implementation of โ€‹

IInteraction.menuTap

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:221


move โ€‹

โ–ธ move(data): void

Parameters โ€‹

NameType
dataIMoveEvent

Returns โ€‹

void

Implementation of โ€‹

IInteraction.move

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:230


zoom โ€‹

โ–ธ zoom(data): void

Parameters โ€‹

NameType
dataIZoomEvent

Returns โ€‹

void

Implementation of โ€‹

IInteraction.zoom

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:234


rotate โ€‹

โ–ธ rotate(data): void

Parameters โ€‹

NameType
dataIRotateEvent

Returns โ€‹

void

Implementation of โ€‹

IInteraction.rotate

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:238


transformEnd โ€‹

โ–ธ transformEnd(): void

Returns โ€‹

void

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:242


keyDown โ€‹

โ–ธ keyDown(data): void

Parameters โ€‹

NameType
dataIKeyEvent

Returns โ€‹

void

Implementation of โ€‹

IInteraction.keyDown

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:249


keyUp โ€‹

โ–ธ keyUp(data): void

Parameters โ€‹

NameType
dataIKeyEvent

Returns โ€‹

void

Implementation of โ€‹

IInteraction.keyUp

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:266


pointerHover โ€‹

โ–ธ pointerHover(data): void

Parameters โ€‹

NameType
dataIPointerEvent

Returns โ€‹

void

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:279


pointerOverOrOut โ€‹

โ–ธ pointerOverOrOut(data): void

Parameters โ€‹

NameType
dataIPointerEvent

Returns โ€‹

void

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:286


pointerEnterOrLeave โ€‹

โ–ธ pointerEnterOrLeave(data): void

Parameters โ€‹

NameType
dataIPointerEvent

Returns โ€‹

void

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:301


touchLeave โ€‹

โ–ธ touchLeave(data): void

Parameters โ€‹

NameType
dataIPointerEvent

Returns โ€‹

void

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:316


tap โ€‹

โ–ธ tap(data): void

Parameters โ€‹

NameType
dataIPointerEvent

Returns โ€‹

void

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:325


findPath โ€‹

โ–ธ findPath(data, options?): ILeafList

Parameters โ€‹

NameType
dataIPointerEvent
options?IPickOptions

Returns โ€‹

ILeafList

Implementation of โ€‹

IInteraction.findPath

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:365


isRootPath โ€‹

โ–ธ isRootPath(data): boolean

Parameters โ€‹

NameType
dataIPointerEvent

Returns โ€‹

boolean

Implementation of โ€‹

IInteraction.isRootPath

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:374


isTreePath โ€‹

โ–ธ isTreePath(data): boolean

Parameters โ€‹

NameType
dataIPointerEvent

Returns โ€‹

boolean

Implementation of โ€‹

IInteraction.isTreePath

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:378


checkPath โ€‹

โ–ธ checkPath(data, useDefaultPath?): void

Parameters โ€‹

NameType
dataIPointerEvent
useDefaultPath?boolean

Returns โ€‹

void

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:384


canMove โ€‹

โ–ธ canMove(data): boolean

Parameters โ€‹

NameType
dataIPointerEvent

Returns โ€‹

boolean

Implementation of โ€‹

IInteraction.canMove

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:388


isDrag โ€‹

โ–ธ isDrag(leaf): boolean

Parameters โ€‹

NameType
leafILeaf

Returns โ€‹

boolean

Implementation of โ€‹

IInteraction.isDrag

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:393


isPress โ€‹

โ–ธ isPress(leaf): boolean

Parameters โ€‹

NameType
leafILeaf

Returns โ€‹

boolean

Implementation of โ€‹

IInteraction.isPress

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:397


isHover โ€‹

โ–ธ isHover(leaf): boolean

Parameters โ€‹

NameType
leafILeaf

Returns โ€‹

boolean

Implementation of โ€‹

IInteraction.isHover

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:401


isFocus โ€‹

โ–ธ isFocus(leaf): boolean

Parameters โ€‹

NameType
leafILeaf

Returns โ€‹

boolean

Implementation of โ€‹

IInteraction.isFocus

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:405


cancelHover โ€‹

โ–ธ cancelHover(): void

Returns โ€‹

void

Implementation of โ€‹

IInteraction.cancelHover

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:410


updateDownData โ€‹

โ–ธ updateDownData(data?, options?, merge?): void

Parameters โ€‹

NameType
data?IPointerEvent
options?IPickOptions
merge?boolean

Returns โ€‹

void

Implementation of โ€‹

IInteraction.updateDownData

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:419


updateHoverData โ€‹

โ–ธ updateHoverData(data?): void

Parameters โ€‹

NameType
data?IPointerEvent

Returns โ€‹

void

Implementation of โ€‹

IInteraction.updateHoverData

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:428


updateCursor โ€‹

โ–ธ updateCursor(data?): void

Parameters โ€‹

NameType
data?IPointerEvent

Returns โ€‹

void

Implementation of โ€‹

IInteraction.updateCursor

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:435


setCursor โ€‹

โ–ธ setCursor(cursor): void

Parameters โ€‹

NameType
cursorICursorType | ICursorType[]

Returns โ€‹

void

Implementation of โ€‹

IInteraction.setCursor

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:461


getLocal โ€‹

โ–ธ getLocal(clientPoint, updateClient?): IPointData

Parameters โ€‹

NameType
clientPointIClientPointData
updateClient?boolean

Returns โ€‹

IPointData

Implementation of โ€‹

IInteraction.getLocal

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:465


emitTap โ€‹

โ–ธ emitTap(data): void

Parameters โ€‹

NameType
dataIPointerEvent

Returns โ€‹

void

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:471


emitDoubleTap โ€‹

โ–ธ emitDoubleTap(data): void

Parameters โ€‹

NameType
dataIPointerEvent

Returns โ€‹

void

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:476


pointerWaitCancel โ€‹

โ–ธ pointerWaitCancel(): void

Returns โ€‹

void

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:481


tapWait โ€‹

โ–ธ tapWait(): void

Returns โ€‹

void

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:486


tapWaitCancel โ€‹

โ–ธ tapWaitCancel(): void

Returns โ€‹

void

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:491


longPressWait โ€‹

โ–ธ longPressWait(data): void

Parameters โ€‹

NameType
dataIPointerEvent

Returns โ€‹

void

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:497


longTap โ€‹

โ–ธ longTap(data): boolean

Parameters โ€‹

NameType
dataIPointerEvent

Returns โ€‹

boolean

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:505


longPressWaitCancel โ€‹

โ–ธ longPressWaitCancel(): void

Returns โ€‹

void

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:515


__onResize โ€‹

โ–ธ __onResize(): void

Returns โ€‹

void

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:520


__listenEvents โ€‹

โ–ธ __listenEvents(): void

Returns โ€‹

void

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:525


__removeListenEvents โ€‹

โ–ธ __removeListenEvents(): void

Returns โ€‹

void

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:531


emit โ€‹

โ–ธ emit(type, data, path?, excludePath?): void

Parameters โ€‹

NameType
typestring
dataIUIEvent
path?ILeafList
excludePath?ILeafList

Returns โ€‹

void

Implementation of โ€‹

IInteraction.emit

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:537


destroy โ€‹

โ–ธ destroy(): void

Returns โ€‹

void

Implementation of โ€‹

IInteraction.destroy

Defined in โ€‹

ui/packages/interaction/interaction/src/Interaction.ts:542

Released under the MIT License.