API Reference

Class List

pc.MouseEvent

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

Summary

Properties

altKeyTrue if the alt key was pressed when this event was fired
buttonThe button
ctrlKeyTrue if the ctrl key was pressed when this event was fired
dxThe change in x co-ordinate since the last mouse event
dyThe change in y co-ordinate since the last mouse event
elementThe element that the mouse was fired from
eventThe original browser event
metaKeyTrue if the meta key was pressed when this event was fired
shiftKeyTrue if the shift key was pressed when this event was fired
wheelA value representing the amount the mouse wheel has moved, only valid for mousemove events
xThe x co-ordinate of the mouse pointer relative to the element pc.
yThe y co-ordinate of the mouse pointer relative to the element pc.

Details

Constructor

MouseEvent(mouse, event)

Create an new MouseEvent

Parameters

mousepc.MouseThe Mouse device that is firing this event
eventMouseEventThe original browser event that fired

Properties

BooleanaltKey

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

pc.MOUSEBUTTONbutton

The button

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

Numberwheel

A value representing the amount the mouse wheel has moved, only valid for mousemove 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