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
Show file tree
Hide file tree
Changes from all commits
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
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 <dfreedm@google.com>
Boris Smus <boris@smus.com>
Yvonne Yip <ykyyip@google.com>
Expand All @@ -23,3 +24,6 @@ Stefan Neubert <dev@steditor.net>
Jörn Zaefferer <joern.zaefferer@gmail.com>
Marius Stefan Bethge <marius.bethge@gmail.com>
Rob Larsen <rob@htmlcssjavascript.com>
Alexander Schmitz <arschmitz@gmail.com>
Robert Tuttle <robert.tuttle@frogdesign.com>
Brenton Simpson <appsforartists@google.com>
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