Skip to content

Commit

Permalink
Merge pull request #38 from AquiGorka/master
Browse files Browse the repository at this point in the history
Swipe: added duration and distance to the returned info on swipe
  • Loading branch information
mike-schultz authored Mar 23, 2018
2 parents 8a66712 + 8d38b9e commit a5ce838
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/gestures/Swipe.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ class Swipe extends Gesture {

output.data[i] = {
velocity: velocity,
distance: util.distanceBetweenTwoPoints(lastMove.x, currentMove.x, lastMove.y, currentMove.y),
duration: currentMove.time - lastMove.time,
currentDirection: util.getAngle(
lastMove.x,
lastMove.y,
Expand Down

0 comments on commit a5ce838

Please sign in to comment.