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:70

Properties ​

target ​

â€ĸ target: ILeaf

Implementation of ​

IInteraction.target

Defined in ​

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


canvas ​

â€ĸ canvas: IInteractionCanvas

Implementation of ​

IInteraction.canvas

Defined in ​

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


selector ​

â€ĸ selector: ISelector

Implementation of ​

IInteraction.selector

Defined in ​

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


running ​

â€ĸ running: boolean

Implementation of ​

IInteraction.running

Defined in ​

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


config ​

â€ĸ config: IInteractionConfig

Implementation of ​

IInteraction.config

Defined in ​

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


cursor ​

â€ĸ cursor: ICursorType | ICursorType[]

Implementation of ​

IInteraction.cursor

Defined in ​

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


bottomList ​

â€ĸ Optional bottomList: IPickBottom[]

Implementation of ​

IInteraction.bottomList

Defined in ​

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


shrinkCanvasBounds ​

â€ĸ shrinkCanvasBounds: IBounds

Implementation of ​

IInteraction.shrinkCanvasBounds

Defined in ​

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


downData ​

â€ĸ downData: IPointerEvent

Implementation of ​

IInteraction.downData

Defined in ​

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


hoverData ​

â€ĸ hoverData: IPointerEvent

Implementation of ​

IInteraction.hoverData

Defined in ​

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


focusData ​

â€ĸ focusData: ILeaf

Implementation of ​

IInteraction.focusData

Defined in ​

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


downTime ​

â€ĸ downTime: number

Implementation of ​

IInteraction.downTime

Defined in ​

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


overPath ​

â€ĸ Protected overPath: LeafList

Defined in ​

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


enterPath ​

â€ĸ Protected enterPath: LeafList

Defined in ​

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


waitMenuTap ​

â€ĸ Protected waitMenuTap: boolean

Defined in ​

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


waitRightTap ​

â€ĸ Protected waitRightTap: boolean

Defined in ​

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


waitTap ​

â€ĸ Protected waitTap: boolean

Defined in ​

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


longPressTimer ​

â€ĸ Protected longPressTimer: any

Defined in ​

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


longPressed ​

â€ĸ Protected longPressed: boolean

Defined in ​

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


tapCount ​

â€ĸ Protected tapCount: number = 0

Defined in ​

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


tapTimer ​

â€ĸ Protected tapTimer: any

Defined in ​

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


dragger ​

â€ĸ dragger: Dragger

Defined in ​

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


transformer ​

â€ĸ transformer: ITransformer

Defined in ​

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


__eventIds ​

â€ĸ Protected __eventIds: IEventListenerId[]

Defined in ​

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


defaultPath ​

â€ĸ Protected defaultPath: ILeafList

Defined in ​

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


downKeyMap ​

â€ĸ Protected downKeyMap: IBooleanMap = {}

Defined in ​

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

Accessors ​

dragging ​

â€ĸ get dragging(): boolean

Returns ​

boolean

Implementation of ​

IInteraction.dragging

Defined in ​

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


transforming ​

â€ĸ get transforming(): boolean

Returns ​

boolean

Implementation of ​

IInteraction.transforming

Defined in ​

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


moveMode ​

â€ĸ get moveMode(): boolean

Returns ​

boolean

Implementation of ​

IInteraction.moveMode

Defined in ​

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


canHover ​

â€ĸ get canHover(): boolean

Returns ​

boolean

Implementation of ​

IInteraction.canHover

Defined in ​

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


isDragEmpty ​

â€ĸ get isDragEmpty(): boolean

Returns ​

boolean

Implementation of ​

IInteraction.isDragEmpty

Defined in ​

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


isMobileDragEmpty ​

â€ĸ get isMobileDragEmpty(): boolean

Returns ​

boolean

Implementation of ​

IInteraction.isMobileDragEmpty

Defined in ​

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


isHoldMiddleKey ​

â€ĸ get isHoldMiddleKey(): boolean

Returns ​

boolean

Implementation of ​

IInteraction.isHoldMiddleKey

Defined in ​

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


isHoldRightKey ​

â€ĸ get isHoldRightKey(): boolean

Returns ​

boolean

Implementation of ​

IInteraction.isHoldRightKey

Defined in ​

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


isHoldSpaceKey ​

â€ĸ get isHoldSpaceKey(): boolean

Returns ​

boolean

Implementation of ​

IInteraction.isHoldSpaceKey

Defined in ​

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


m ​

â€ĸ get m(): IMoveConfig

Returns ​

IMoveConfig

Implementation of ​

IInteraction.m

Defined in ​

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


p ​

â€ĸ get p(): IPointerConfig

Returns ​

IPointerConfig

Implementation of ​

IInteraction.p

Defined in ​

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


hitRadius ​

â€ĸ get hitRadius(): number

Returns ​

number

Implementation of ​

IInteraction.hitRadius

Defined in ​

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

Methods ​

start ​

▸ start(): void

Returns ​

void

Implementation of ​

IInteraction.start

Defined in ​

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


stop ​

▸ stop(): void

Returns ​

void

Implementation of ​

IInteraction.stop

Defined in ​

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


receive ​

▸ receive(_event): void

Parameters ​

NameType
_eventany

Returns ​

void

Implementation of ​

IInteraction.receive

Defined in ​

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


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:96


pointerMove ​

▸ pointerMove(data?): void

Parameters ​

NameType
data?IPointerEvent

Returns ​

void

Implementation of ​

IInteraction.pointerMove

Defined in ​

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


pointerMoveReal ​

▸ pointerMoveReal(data): void

Parameters ​

NameType
dataIPointerEvent

Returns ​

void

Implementation of ​

IInteraction.pointerMoveReal

Defined in ​

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


pointerUp ​

▸ pointerUp(data?): void

Parameters ​

NameType
data?IPointerEvent

Returns ​

void

Implementation of ​

IInteraction.pointerUp

Defined in ​

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


pointerCancel ​

▸ pointerCancel(): void

Returns ​

void

Implementation of ​

IInteraction.pointerCancel

Defined in ​

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


▸ menu(data): void

Parameters ​

NameType
dataIPointerEvent

Returns ​

void

Implementation of ​

IInteraction.menu

Defined in ​

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


▸ menuTap(data): void

Parameters ​

NameType
dataIPointerEvent

Returns ​

void

Implementation of ​

IInteraction.menuTap

Defined in ​

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


createTransformer ​

▸ createTransformer(): void

Returns ​

void

Defined in ​

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


move ​

▸ move(_data): void

Parameters ​

NameType
_dataIMoveEvent

Returns ​

void

Implementation of ​

IInteraction.move

Defined in ​

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


zoom ​

▸ zoom(_data): void

Parameters ​

NameType
_dataIZoomEvent

Returns ​

void

Implementation of ​

IInteraction.zoom

Defined in ​

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


rotate ​

▸ rotate(_data): void

Parameters ​

NameType
_dataIRotateEvent

Returns ​

void

Implementation of ​

IInteraction.rotate

Defined in ​

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


transformEnd ​

▸ transformEnd(): void

Returns ​

void

Defined in ​

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


wheel ​

▸ wheel(_data): void

Parameters ​

NameType
_dataIWheelEvent

Returns ​

void

Defined in ​

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


multiTouch ​

▸ multiTouch(_data, _list): void

Parameters ​

NameType
_dataIUIEvent
_listIKeepTouchData[]

Returns ​

void

Implementation of ​

IInteraction.multiTouch

Defined in ​

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


keyDown ​

▸ keyDown(data): void

Parameters ​

NameType
dataIKeyEvent

Returns ​

void

Implementation of ​

IInteraction.keyDown

Defined in ​

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


keyUp ​

▸ keyUp(data): void

Parameters ​

NameType
dataIKeyEvent

Returns ​

void

Implementation of ​

IInteraction.keyUp

Defined in ​

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


pointerHover ​

▸ pointerHover(data): void

Parameters ​

NameType
dataIPointerEvent

Returns ​

void

Defined in ​

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


pointerOverOrOut ​

▸ pointerOverOrOut(data): void

Parameters ​

NameType
dataIPointerEvent

Returns ​

void

Defined in ​

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


pointerEnterOrLeave ​

▸ pointerEnterOrLeave(data): void

Parameters ​

NameType
dataIPointerEvent

Returns ​

void

Defined in ​

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


touchLeave ​

▸ touchLeave(data): void

Parameters ​

NameType
dataIPointerEvent

Returns ​

void

Defined in ​

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


tap ​

▸ tap(data): void

Parameters ​

NameType
dataIPointerEvent

Returns ​

void

Defined in ​

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


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:354


isRootPath ​

▸ isRootPath(data): boolean

Parameters ​

NameType
dataIPointerEvent

Returns ​

boolean

Implementation of ​

IInteraction.isRootPath

Defined in ​

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


isTreePath ​

▸ isTreePath(data): boolean

Parameters ​

NameType
dataIPointerEvent

Returns ​

boolean

Implementation of ​

IInteraction.isTreePath

Defined in ​

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


checkPath ​

▸ checkPath(data, useDefaultPath?): void

Parameters ​

NameType
dataIPointerEvent
useDefaultPath?boolean

Returns ​

void

Defined in ​

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


canMove ​

▸ canMove(data): boolean

Parameters ​

NameType
dataIPointerEvent

Returns ​

boolean

Implementation of ​

IInteraction.canMove

Defined in ​

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


isDrag ​

▸ isDrag(leaf): boolean

Parameters ​

NameType
leafILeaf

Returns ​

boolean

Implementation of ​

IInteraction.isDrag

Defined in ​

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


isPress ​

▸ isPress(leaf): boolean

Parameters ​

NameType
leafILeaf

Returns ​

boolean

Implementation of ​

IInteraction.isPress

Defined in ​

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


isHover ​

▸ isHover(leaf): boolean

Parameters ​

NameType
leafILeaf

Returns ​

boolean

Implementation of ​

IInteraction.isHover

Defined in ​

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


isFocus ​

▸ isFocus(leaf): boolean

Parameters ​

NameType
leafILeaf

Returns ​

boolean

Implementation of ​

IInteraction.isFocus

Defined in ​

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


cancelHover ​

▸ cancelHover(): void

Returns ​

void

Implementation of ​

IInteraction.cancelHover

Defined in ​

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


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:408


updateHoverData ​

▸ updateHoverData(data?): void

Parameters ​

NameType
data?IPointerEvent

Returns ​

void

Implementation of ​

IInteraction.updateHoverData

Defined in ​

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


updateCursor ​

▸ updateCursor(data?): void

Parameters ​

NameType
data?IPointerEvent

Returns ​

void

Implementation of ​

IInteraction.updateCursor

Defined in ​

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


setCursor ​

▸ setCursor(cursor): void

Parameters ​

NameType
cursorICursorType | ICursorType[]

Returns ​

void

Implementation of ​

IInteraction.setCursor

Defined in ​

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


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:454


emitTap ​

▸ emitTap(data): void

Parameters ​

NameType
dataIPointerEvent

Returns ​

void

Defined in ​

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


emitDoubleTap ​

▸ emitDoubleTap(data): void

Parameters ​

NameType
dataIPointerEvent

Returns ​

void

Defined in ​

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


pointerWaitCancel ​

▸ pointerWaitCancel(): void

Returns ​

void

Defined in ​

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


tapWait ​

▸ tapWait(): void

Returns ​

void

Defined in ​

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


tapWaitCancel ​

▸ tapWaitCancel(): void

Returns ​

void

Defined in ​

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


longPressWait ​

▸ longPressWait(data): void

Parameters ​

NameType
dataIPointerEvent

Returns ​

void

Defined in ​

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


longTap ​

▸ longTap(data): boolean

Parameters ​

NameType
dataIPointerEvent

Returns ​

boolean

Defined in ​

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


longPressWaitCancel ​

▸ longPressWaitCancel(): void

Returns ​

void

Defined in ​

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


__onResize ​

▸ __onResize(): void

Returns ​

void

Defined in ​

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


__listenEvents ​

▸ __listenEvents(): void

Returns ​

void

Defined in ​

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


__removeListenEvents ​

▸ __removeListenEvents(): void

Returns ​

void

Defined in ​

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


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:527


destroy ​

▸ destroy(): void

Returns ​

void

Implementation of ​

IInteraction.destroy

Defined in ​

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

Released under the MIT License.