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 coordinate since the last mouse event. |
dy | The change in y coordinate 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 EVENT_MOUSEWHEEL events. |
x | The x coordinate of the mouse pointer relative to the element Mouse is attached to. |
y | The y coordinate of the mouse pointer relative to the element Mouse is attached to. |
Details
Constructor
MouseEvent(mouse, event)
Create a new MouseEvent instance.
Parameters
mouse | Mouse | The Mouse device that is firing this event. |
event | globalThis.MouseEvent | The original browser event that fired. |
Properties
A value representing the amount the mouse wheel has moved, only valid for EVENT_MOUSEWHEEL events.