diff --git a/src/touch.js b/src/touch.js index 8359a601e..eee424551 100644 --- a/src/touch.js +++ b/src/touch.js @@ -45,9 +45,9 @@ if (touch.isDoubleTap) { touch.el.trigger('doubleTap') touch = {} - } else if (touch.x2 > 0 || touch.y2 > 0) { - (Math.abs(touch.x1 - touch.x2) > 30 || Math.abs(touch.y1 - touch.y2) > 30) && - touch.el.trigger('swipe') && + } else if ((touch.x2 && Math.abs(touch.x1 - touch.x2) > 30) || + (touch.y2 && Math.abs(touch.y1 - touch.y2) > 30)) { + touch.el.trigger('swipe') && touch.el.trigger('swipe' + (swipeDirection(touch.x1, touch.x2, touch.y1, touch.y2))) touch.x1 = touch.x2 = touch.y1 = touch.y2 = touch.last = 0 } else if ('last' in touch) {