You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-20Lines changed: 7 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,34 +4,25 @@ This project proposes a unified and consistent javascript events API which aims
4
4
5
5
This API is a shim of the [W3C Pointer Events specification][W3C_pointer] and adds features that are out of scope of the current specification.
6
6
7
-
- Generates **Pointer Events** according to the current specification..
7
+
- Generates **Pointer Events** according to the current specification.
8
8
- Use attribute `touch-action` to set touch action on HTML elements; generates `touch-action` and `ms-touch-action` CSS properties when supported by the browser.
9
9
- Support **Pointer Capture** with mouse and touch events.
The API has been successfully tested on the following environments.
15
15
###Mobile
16
16
17
-
- Android 4.1.1+ (Stock browser and Chrome)
17
+
- Android 4.1.2+ (Stock browser and Chrome)
18
18
- BlackBerry 10+
19
19
- iOS 6.1.3+
20
-
- WindowsPhone 8
20
+
- WindowsPhone 8.x
21
21
22
22
###Desktop
23
-
-**Pointer Events are always generated when using a mouse on a supported desktop browser**.
24
-
- Multi touch (the ability to get multiple pointers) depends on how the browser handles "finger/pen" user actions. The general rule is:
25
-
- **If your browser supports only mouse events, you will get Pointer Events mapped on mouse events.** For instance, IE9 may be used with a touch screen but you would get only one pointer at a time because pointer events are mapped on mouse events.
26
-
- **If your browser supports native touch events, you will get Pointer Events mapped on native touch events.** For instance, on Chrome which handles native touch events you will get multiple pointers because pointer events are mapped on touch events.
27
-
28
-
####Multi touch support
29
-
- Chrome
30
-
- IE10+
31
-
32
-
####Mouse support (and single touch when possible)
This project can be integrated into any AMD capable javascript application.
@@ -67,13 +58,9 @@ To run the tests/samples you need to set [requirejs] and [domReady] as a sibling
67
58
<root>/domReady/domReady.js
68
59
69
60
##Limitations
70
-
- Touch action values `pan-x` and `pan-y` have the same effect as `none`.
71
-
-`event.button` returns `0` instead of `-1` on mouse move when no buttons are pressed.
72
-
- Pointer Events specification defines a new set of values for `event.button` and `event.buttons`: Mouse move with no buttons pressed should generate `event.button=-1`. It is not possible to force `-1` on `event.button` on browsers because they use unsigned int as internal representation of `event.button`. Setting -1 gives inconsistent results (some browsers return 0, other 65535...).
73
61
- Pen properties (pressure/tiltx,y/height/width...) are not implemented. Properties are defined with default values. The API has not been tested with pens.
74
62
- Avoid to rely on `pointerType`. In some cases (for instance, when a mouse is plugged on Android devices), the type may not be accurate (the mouse generates touch events and there is no way to know that they originate from a mouse.).
0 commit comments