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

PointerEvent: set pressure to 0 unless pointer is down #313

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
PointerEvent: set pressure to 0 unless pointer is down
Fixes gh-180
  • Loading branch information
appsforartists committed Sep 21, 2016
commit f0970758abc7be5817fb1a94ca67afb15a12b924
3 changes: 2 additions & 1 deletion src/PointerEvent.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ function PointerEvent(inType, inDict) {
// Spec requires that pointers without pressure specified use 0.5 for down
// state and 0 for up state.
var pressure = 0;
if (inDict.pressure) {

if (inDict.pressure && e.buttons) {
pressure = inDict.pressure;
} else {
pressure = e.buttons ? 0.5 : 0;
Expand Down