Skip to content

Commit

Permalink
Merge pull request #101 from jerrybendy/100-issue-with-the-swipe-dete…
Browse files Browse the repository at this point in the history
…ction-logic

Change the way to determine the direction of swipe #100
  • Loading branch information
jerrybendy authored Sep 27, 2023
2 parents 8ddf2b1 + 0f1b96c commit 8d6d163
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ var vueTouchEvents = {
distanceX = Math.abs($this.startX - $this.currentX);

if (distanceY > swipeOutBounded || distanceX > swipeOutBounded) {
if (distanceY > swipeOutBounded) {
if (distanceY > distanceX) {
direction = $this.startY > $this.currentY ? 'top' : 'bottom';
} else {
direction = $this.startX > $this.currentX ? 'left' : 'right';
Expand Down

0 comments on commit 8d6d163

Please sign in to comment.