API Reference

Class List

pc.MouseEvent

MouseEvent object that is passed to events 'mousemove', 'mouseup', 'mousedown' and 'mousewheel'.

Summary

Properties

altKey

True if the alt key was pressed when this event was fired.

button

The mouse button associated with this event.

ctrlKey

True if the ctrl key was pressed when this event was fired.

dx

The change in x co-ordinate since the last mouse event.

dy

The change in y co-ordinate since the last mouse event.

element

The element that the mouse was fired from.

event

The original browser event.

metaKey

True if the meta key was pressed when this event was fired.

shiftKey

True if the shift key was pressed when this event was fired.

wheelDelta

A value representing the amount the mouse wheel has moved, only valid for mousewheel events.

x

The x co-ordinate of the mouse pointer relative to the element pc.

y

The y co-ordinate of the mouse pointer relative to the element pc.

Details

Constructor

MouseEvent(mouse, event)

Create an new MouseEvent.

Parameters

mousepc.Mouse

The Mouse device that is firing this event.

eventMouseEvent

The original browser event that fired.

Properties

booleanaltKey

True if the alt key was pressed when this event was fired.

numberbutton

The mouse button associated with this event. Can be:

booleanctrlKey

True if the ctrl key was pressed when this event was fired.

numberdx

The change in x co-ordinate since the last mouse event.

numberdy

The change in y co-ordinate since the last mouse event.

Elementelement

The element that the mouse was fired from.

MouseEventevent

The original browser event.

booleanmetaKey

True if the meta key was pressed when this event was fired.

booleanshiftKey

True if the shift key was pressed when this event was fired.

numberwheelDelta

A value representing the amount the mouse wheel has moved, only valid for mousewheel events.

numberx

The x co-ordinate of the mouse pointer relative to the element pc.Mouse is attached to.

numbery

The y co-ordinate of the mouse pointer relative to the element pc.Mouse is attached to.