Skip to content
This repository was archived by the owner on Feb 11, 2021. It is now read-only.

Commit 00f2e8f

Browse files
appsforartistsscottgonzalez
authored andcommitted
PointerEvent: set pressure to 0 unless pointer is down
Fixes gh-180 Closes gh-313
1 parent 6ca690f commit 00f2e8f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/PointerEvent.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ function PointerEvent(inType, inDict) {
6767
// Spec requires that pointers without pressure specified use 0.5 for down
6868
// state and 0 for up state.
6969
var pressure = 0;
70-
if (inDict.pressure) {
70+
71+
if (inDict.pressure && e.buttons) {
7172
pressure = inDict.pressure;
7273
} else {
7374
pressure = e.buttons ? 0.5 : 0;

0 commit comments

Comments
 (0)