Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mozilla/pointer.js
INACTIVE - http://mzl.la/ghe-archive - INACTIVE - http://mzl.la/ghe-archive - Normalizes mouse/touch events into 'pointer' events.
https://github.com/mozilla/pointer.js
inactive unmaintained
Last synced: about 1 month ago
JSON representation
INACTIVE - http://mzl.la/ghe-archive - INACTIVE - http://mzl.la/ghe-archive - Normalizes mouse/touch events into 'pointer' events.
- Host: GitHub
- URL: https://github.com/mozilla/pointer.js
- Owner: mozilla
- License: bsd-3-clause
- Archived: true
- Created: 2013-05-24T20:51:54.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2019-03-28T04:15:45.000Z (over 5 years ago)
- Last Synced: 2024-05-22T17:22:33.468Z (4 months ago)
- Topics: inactive, unmaintained
- Language: JavaScript
- Size: 131 KB
- Stars: 433
- Watchers: 35
- Forks: 32
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pointer.js
Normalizes mouse/touch events into 'pointer' events.
## Note
This library is in the process of being re-written to support the [W3C Pointer Events specification](http://www.w3.org/TR/pointerevents/).
## Types of Events
The following events are generated:
* `pointerdown`: based on mousedown/touchstart
* `pointerup`: based on mouseup/touchend
* `pointermove`: based on mousemove/touchmove
* `pointerleave`: based on mouseout/touchleave
* `pointerclick`: a 'fast click' event based on a sequence of the above events. Additional heuristics are applied to determine whether or not to generate a `pointerclick`.## Event Objects
`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.