Skip to content
This repository was 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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions AUTHORS.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Authors ordered by first contribution

Google, Inc.
Daniel Freedman <[email protected]>
Boris Smus <[email protected]>
Yvonne Yip <[email protected]>
Expand All @@ -23,3 +24,6 @@ Stefan Neubert <[email protected]>
Jörn Zaefferer <[email protected]>
Marius Stefan Bethge <[email protected]>
Rob Larsen <[email protected]>
Alexander Schmitz <[email protected]>
Robert Tuttle <[email protected]>
Brenton Simpson <[email protected]>
5 changes: 5 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ module.exports = function(grunt) {
var allFiles = srcFiles.concat(buildFiles).concat(testFiles);

grunt.initConfig({
authors: {
prior: [
'Google, Inc.'
]
},
uglify: {
pointerevents: {
options: {
Expand Down
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