@interactjs / core/InteractEvent / InteractEvent
Class: InteractEvent<T, P>
core/InteractEvent.InteractEvent
Type parameters
Name | Type |
---|---|
T | extends ActionName = never |
P | extends EventPhase = EventPhase |
Hierarchy
BaseEvent
<T
>↳
InteractEvent
Table of contents
Properties
- altKey
- axes
- button
- buttons
- client
- clientX
- clientX0
- clientY
- clientY0
- ctrlKey
- currentTarget
- delta
- dragEnter
- dragLeave
- dropzone
- dt
- duration
- dx
- dy
- immediatePropagationStopped
- interactable
- interaction
- metaKey
- modifiers
- page
- pageX
- pageY
- propagationStopped
- rect
- relatedTarget
- screenX
- screenY
- shiftKey
- speed
- swipe
- t0
- target
- timeStamp
- type
- velocity
- velocityX
- velocityY
- x0
- y0
Methods
Properties
altKey
• altKey: boolean
Defined in
axes
• Optional
axes: "x"
| "y"
| "xy"
Defined in
button
• button: number
Defined in
buttons
• buttons: number
Defined in
client
• client: Point
Defined in
clientX
• clientX: number
Defined in
clientX0
• clientX0: number
Defined in
clientY
• clientY: number
Defined in
clientY0
• clientY0: number
Defined in
ctrlKey
• ctrlKey: boolean
Defined in
currentTarget
• currentTarget: Element
Inherited from
Defined in
delta
• delta: Point
Defined in
dragEnter
• Optional
dragEnter: Element
Defined in
dragLeave
• Optional
dragLeave: Element
Defined in
dropzone
• Optional
dropzone: Interactable
Defined in
dt
• dt: number
Defined in
duration
• duration: number
Defined in
dx
• dx: number
Defined in
dy
• dy: number
Defined in
immediatePropagationStopped
• immediatePropagationStopped: boolean
= false
Inherited from
BaseEvent.immediatePropagationStopped
Defined in
interactable
• interactable: Interactable
Inherited from
Defined in
interaction
• interaction: InteractionProxy
<T
>
Inherited from
Defined in
metaKey
• metaKey: boolean
Defined in
modifiers
• Optional
modifiers: { [key: string]
: any
; name
: string
}[]
Defined in
page
• page: Point
Defined in
pageX
• pageX: number
Defined in
pageY
• pageY: number
Defined in
propagationStopped
• propagationStopped: boolean
= false
Inherited from
Defined in
rect
• rect: Required
<Rect
>
Defined in
relatedTarget
• relatedTarget: Element
= null
Defined in
screenX
• Optional
screenX: number
Defined in
screenY
• Optional
screenY: number
Defined in
shiftKey
• shiftKey: boolean
Defined in
speed
• speed: number
Defined in
swipe
• swipe: Object
Type declaration
Name | Type |
---|---|
angle | number |
down | boolean |
left | boolean |
right | boolean |
speed | number |
up | boolean |
velocity | { x : number = interaction.prevEvent.velocityX; y : number = interaction.prevEvent.velocityY } |
velocity.x | number |
velocity.y | number |
Defined in
t0
• t0: number
Defined in
target
• target: Element
Inherited from
Defined in
timeStamp
• timeStamp: number
Inherited from
Defined in
type
• type: string
Inherited from
Defined in
velocity
• velocity: Point
Defined in
velocityX
• velocityX: number
Defined in
velocityY
• velocityY: number
Defined in
x0
• x0: number
Defined in
y0
• y0: number
Defined in
Methods
getSwipe
â–¸ getSwipe(): Object
Returns
Object
Name | Type |
---|---|
angle | number |
down | boolean |
left | boolean |
right | boolean |
speed | number |
up | boolean |
velocity | { x : number = interaction.prevEvent.velocityX; y : number = interaction.prevEvent.velocityY } |
velocity.x | number |
velocity.y | number |
Defined in
preventDefault
â–¸ preventDefault(): void
Returns
void
Inherited from
Defined in
stopImmediatePropagation
â–¸ stopImmediatePropagation(): void
Don’t call listeners on the remaining targets
Returns
void
Inherited from
BaseEvent.stopImmediatePropagation
Defined in
stopPropagation
â–¸ stopPropagation(): void
Don’t call any other listeners (even on the current target)
Returns
void