Normalizes mouse/touch events into 'pointer' events.
This library is in the process of being re-written to support the W3C Pointer Events specification.
The following events are generated:
pointerdown
: based on mousedown/touchstartpointerup
: based on mouseup/touchendpointermove
: based on mousemove/touchmovepointerleave
: based on mouseout/touchleavepointerclick
: a 'fast click' event based on a sequence of the above events. Additional heuristics are applied to determine whether or not to generate apointerclick
.
pointer
events have the following custom properties:
maskedEvent
: the event that triggered the pointer event.touch
: boolean- is maskedEvent a touch event?mouse
: boolean- is maskedEvent a mouse event?x
: page-normalized x coordinate of the event.y
: page-normalized y coordinate of the event.