Class: InteractionBase โ
Hierarchy โ
InteractionBase
โณ
Interaction
Implements โ
Table of contents โ
Constructors โ
Properties โ
- target
- canvas
- selector
- running
- config
- cursor
- bottomList
- shrinkCanvasBounds
- downData
- hoverData
- focusData
- downTime
- overPath
- enterPath
- waitMenuTap
- waitRightTap
- waitTap
- longPressTimer
- longPressed
- tapCount
- tapTimer
- dragger
- transformer
- __eventIds
- defaultPath
- downKeyMap
Accessors โ
- dragging
- transforming
- moveMode
- canHover
- isDragEmpty
- isMobileDragEmpty
- isHoldMiddleKey
- isHoldRightKey
- isHoldSpaceKey
- m
- p
- hitRadius
Methods โ
- start
- stop
- receive
- pointerDown
- pointerMove
- pointerMoveReal
- pointerUp
- pointerCancel
- multiTouch
- menu
- menuTap
- move
- zoom
- rotate
- transformEnd
- keyDown
- keyUp
- pointerHover
- pointerOverOrOut
- pointerEnterOrLeave
- touchLeave
- tap
- findPath
- isRootPath
- isTreePath
- checkPath
- canMove
- isDrag
- isPress
- isHover
- isFocus
- cancelHover
- updateDownData
- updateHoverData
- updateCursor
- setCursor
- getLocal
- emitTap
- emitDoubleTap
- pointerWaitCancel
- tapWait
- tapWaitCancel
- longPressWait
- longTap
- longPressWaitCancel
- __onResize
- __listenEvents
- __removeListenEvents
- emit
- destroy
Constructors โ
constructor โ
โข new InteractionBase(target
, canvas
, selector
, userConfig?
): InteractionBase
Parameters โ
Name | Type |
---|---|
target | ILeaf |
canvas | IInteractionCanvas |
selector | ISelector |
userConfig? | IInteractionConfig |
Returns โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:72
Properties โ
target โ
โข target: ILeaf
Implementation of โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:18
canvas โ
โข canvas: IInteractionCanvas
Implementation of โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:19
selector โ
โข selector: ISelector
Implementation of โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:20
running โ
โข running: boolean
Implementation of โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:22
config โ
โข config: IInteractionConfig
Implementation of โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:36
cursor โ
โข cursor: ICursorType
| ICursorType
[]
Implementation of โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:40
bottomList โ
โข Optional
bottomList: IPickBottom
[]
Implementation of โ
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 โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:47
hoverData โ
โข hoverData: IPointerEvent
Implementation of โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:48
focusData โ
โข focusData: ILeaf
Implementation of โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:49
downTime โ
โข downTime: number
Implementation of โ
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 โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:24
transforming โ
โข get
transforming(): boolean
Returns โ
boolean
Implementation of โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:25
moveMode โ
โข get
moveMode(): boolean
Returns โ
boolean
Implementation of โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:27
canHover โ
โข get
canHover(): boolean
Returns โ
boolean
Implementation of โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:28
isDragEmpty โ
โข get
isDragEmpty(): boolean
Returns โ
boolean
Implementation of โ
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 โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:32
isHoldRightKey โ
โข get
isHoldRightKey(): boolean
Returns โ
boolean
Implementation of โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:33
isHoldSpaceKey โ
โข get
isHoldSpaceKey(): boolean
Returns โ
boolean
Implementation of โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:34
m โ
โข get
m(): IMoveConfig
Returns โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:37
p โ
โข get
p(): IPointerConfig
Returns โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:38
hitRadius โ
โข get
hitRadius(): number
Returns โ
number
Implementation of โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:41
Methods โ
start โ
โธ start(): void
Returns โ
void
Implementation of โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:86
stop โ
โธ stop(): void
Returns โ
void
Implementation of โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:90
receive โ
โธ receive(_event
): void
Parameters โ
Name | Type |
---|---|
_event | any |
Returns โ
void
Implementation of โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:95
pointerDown โ
โธ pointerDown(data?
, useDefaultPath?
): void
Parameters โ
Name | Type |
---|---|
data? | IPointerEvent |
useDefaultPath? | boolean |
Returns โ
void
Implementation of โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:98
pointerMove โ
โธ pointerMove(data?
): void
Parameters โ
Name | Type |
---|---|
data? | IPointerEvent |
Returns โ
void
Implementation of โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:122
pointerMoveReal โ
โธ pointerMoveReal(data
): void
Parameters โ
Name | Type |
---|---|
data | IPointerEvent |
Returns โ
void
Implementation of โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:136
pointerUp โ
โธ pointerUp(data?
): void
Parameters โ
Name | Type |
---|---|
data? | IPointerEvent |
Returns โ
void
Implementation of โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:167
pointerCancel โ
โธ pointerCancel(): void
Returns โ
void
Implementation of โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:198
multiTouch โ
โธ multiTouch(data
, list
): void
Parameters โ
Name | Type |
---|---|
data | IUIEvent |
list | IKeepTouchData [] |
Returns โ
void
Implementation of โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:205
menu โ
โธ menu(data
): void
Parameters โ
Name | Type |
---|---|
data | IPointerEvent |
Returns โ
void
Implementation of โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:214
menuTap โ
โธ menuTap(data
): void
Parameters โ
Name | Type |
---|---|
data | IPointerEvent |
Returns โ
void
Implementation of โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:221
move โ
โธ move(data
): void
Parameters โ
Name | Type |
---|---|
data | IMoveEvent |
Returns โ
void
Implementation of โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:230
zoom โ
โธ zoom(data
): void
Parameters โ
Name | Type |
---|---|
data | IZoomEvent |
Returns โ
void
Implementation of โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:234
rotate โ
โธ rotate(data
): void
Parameters โ
Name | Type |
---|---|
data | IRotateEvent |
Returns โ
void
Implementation of โ
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 โ
Name | Type |
---|---|
data | IKeyEvent |
Returns โ
void
Implementation of โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:249
keyUp โ
โธ keyUp(data
): void
Parameters โ
Name | Type |
---|---|
data | IKeyEvent |
Returns โ
void
Implementation of โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:266
pointerHover โ
โธ pointerHover(data
): void
Parameters โ
Name | Type |
---|---|
data | IPointerEvent |
Returns โ
void
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:279
pointerOverOrOut โ
โธ pointerOverOrOut(data
): void
Parameters โ
Name | Type |
---|---|
data | IPointerEvent |
Returns โ
void
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:286
pointerEnterOrLeave โ
โธ pointerEnterOrLeave(data
): void
Parameters โ
Name | Type |
---|---|
data | IPointerEvent |
Returns โ
void
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:301
touchLeave โ
โธ touchLeave(data
): void
Parameters โ
Name | Type |
---|---|
data | IPointerEvent |
Returns โ
void
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:316
tap โ
โธ tap(data
): void
Parameters โ
Name | Type |
---|---|
data | IPointerEvent |
Returns โ
void
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:325
findPath โ
โธ findPath(data
, options?
): ILeafList
Parameters โ
Name | Type |
---|---|
data | IPointerEvent |
options? | IPickOptions |
Returns โ
Implementation of โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:365
isRootPath โ
โธ isRootPath(data
): boolean
Parameters โ
Name | Type |
---|---|
data | IPointerEvent |
Returns โ
boolean
Implementation of โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:374
isTreePath โ
โธ isTreePath(data
): boolean
Parameters โ
Name | Type |
---|---|
data | IPointerEvent |
Returns โ
boolean
Implementation of โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:378
checkPath โ
โธ checkPath(data
, useDefaultPath?
): void
Parameters โ
Name | Type |
---|---|
data | IPointerEvent |
useDefaultPath? | boolean |
Returns โ
void
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:384
canMove โ
โธ canMove(data
): boolean
Parameters โ
Name | Type |
---|---|
data | IPointerEvent |
Returns โ
boolean
Implementation of โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:388
isDrag โ
โธ isDrag(leaf
): boolean
Parameters โ
Name | Type |
---|---|
leaf | ILeaf |
Returns โ
boolean
Implementation of โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:393
isPress โ
โธ isPress(leaf
): boolean
Parameters โ
Name | Type |
---|---|
leaf | ILeaf |
Returns โ
boolean
Implementation of โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:397
isHover โ
โธ isHover(leaf
): boolean
Parameters โ
Name | Type |
---|---|
leaf | ILeaf |
Returns โ
boolean
Implementation of โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:401
isFocus โ
โธ isFocus(leaf
): boolean
Parameters โ
Name | Type |
---|---|
leaf | ILeaf |
Returns โ
boolean
Implementation of โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:405
cancelHover โ
โธ cancelHover(): void
Returns โ
void
Implementation of โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:410
updateDownData โ
โธ updateDownData(data?
, options?
, merge?
): void
Parameters โ
Name | Type |
---|---|
data? | IPointerEvent |
options? | IPickOptions |
merge? | boolean |
Returns โ
void
Implementation of โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:419
updateHoverData โ
โธ updateHoverData(data?
): void
Parameters โ
Name | Type |
---|---|
data? | IPointerEvent |
Returns โ
void
Implementation of โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:428
updateCursor โ
โธ updateCursor(data?
): void
Parameters โ
Name | Type |
---|---|
data? | IPointerEvent |
Returns โ
void
Implementation of โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:435
setCursor โ
โธ setCursor(cursor
): void
Parameters โ
Name | Type |
---|---|
cursor | ICursorType | ICursorType [] |
Returns โ
void
Implementation of โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:461
getLocal โ
โธ getLocal(clientPoint
, updateClient?
): IPointData
Parameters โ
Name | Type |
---|---|
clientPoint | IClientPointData |
updateClient? | boolean |
Returns โ
Implementation of โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:465
emitTap โ
โธ emitTap(data
): void
Parameters โ
Name | Type |
---|---|
data | IPointerEvent |
Returns โ
void
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:471
emitDoubleTap โ
โธ emitDoubleTap(data
): void
Parameters โ
Name | Type |
---|---|
data | IPointerEvent |
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 โ
Name | Type |
---|---|
data | IPointerEvent |
Returns โ
void
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:497
longTap โ
โธ longTap(data
): boolean
Parameters โ
Name | Type |
---|---|
data | IPointerEvent |
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 โ
Name | Type |
---|---|
type | string |
data | IUIEvent |
path? | ILeafList |
excludePath? | ILeafList |
Returns โ
void
Implementation of โ
Defined in โ
ui/packages/interaction/interaction/src/Interaction.ts:537
destroy โ
โธ destroy(): void
Returns โ
void