
Mirror Engine API / ElementMouseEvent
Class: ElementMouseEvent
Represents a Mouse event fired on a ElementComponent.
Extends
Constructors
new ElementMouseEvent()
new ElementMouseEvent(
event: MouseEvent,
element: ElementComponent,
camera: CameraComponent,
x: number,
y: number,
lastX: number,
lastY: number): ElementMouseEvent
Create an instance of an ElementMouseEvent.
Parameters
event
MouseEvent
The MouseEvent that was originally raised.
element
The ElementComponent that this event was originally raised on.
camera
The CameraComponent that this event was originally raised via.
x
number
The x coordinate.
y
number
The y coordinate.
lastX
number
The last x coordinate.
lastY
number
The last y coordinate.
Returns
Overrides
Properties
altKey
altKey: boolean
Whether the alt key was pressed.
button
button: number
The mouse button.
camera
camera: CameraComponent
The CameraComponent that this event was originally raised via.
Inherited from
ctrlKey
ctrlKey: boolean
Whether the ctrl key was pressed.
dx
dx: number
The amount of horizontal movement of the cursor.
dy
dy: number
The amount of vertical movement of the cursor.
element
element: ElementComponent
The ElementComponent that this event was originally raised on.
Inherited from
event
event: MouseEvent | TouchEvent
MouseEvent or TouchEvent that was originally raised.
Inherited from
metaKey
metaKey: boolean
Whether the meta key was pressed.
shiftKey
shiftKey: boolean
Whether the shift key was pressed.
wheelDelta
wheelDelta: number
The amount of the wheel movement.
Methods
stopPropagation()
stopPropagation(): void
Stop propagation of the event to parent ElementComponents. This also stops propagation of the event to other event listeners of the original DOM Event.
Returns
void