Class: ElementMouseEvent

pc.ElementMouseEvent

Represents a Mouse event fired on a pc.ElementComponent.

Constructor

new ElementMouseEvent(event, element, camera, x, y, lastX, lastY)

Create an instance of a pc.ElementMouseEvent.
Parameters:
Name Type Description
event MouseEvent The MouseEvent that was originally raised.
element pc.ElementComponent The ElementComponent that this event was originally raised on.
camera pc.CameraComponent 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
Properties:
Name Type Description
ctrlKey Boolean Whether the ctrl key was pressed
altKey Boolean Whether the alt key was pressed
shiftKey Boolean Whether the shift key was pressed
metaKey Boolean Whether the meta key was pressed
button Number The mouse button
dx Number The amount of horizontal movement of the cursor
dy Number The amount of vertical movement of the cursor
wheel Number The amount of the wheel movement
Source:

Extends

Methods

stopPropagation()

Stop propagation of the event to parent pc.ElementComponents. This also stops propagation of the event to other event listeners of the original DOM Event.
Inherited From:
Source: