Skip to content

Commit

Permalink
fix: isPressed will be consedered PointerEvent on iOS13
Browse files Browse the repository at this point in the history
  • Loading branch information
umeruma committed Oct 2, 2019
1 parent 390c356 commit a59c87e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ export const degrees = (a) => {
};

export const isPressed = (evt) => {
if (evt.type === 'pointerdown' || evt.type === 'pointermove') {
return true;
}
if (isNaN(evt.buttons)) {
return evt.pressure !== 0;
}
Expand Down

0 comments on commit a59c87e

Please sign in to comment.