Open joetex opened 8 years ago
You should file a pull request.
your else if
fires if distanceX is less than 0 and if greater than 0 :)
the correct one is:
Math.abs(parsedEvent.distanceX)
> 0 || Math.abs(parsedEvent.distanceY) > 0`
it should fire for both X and Y abs values.
There was a bug with large minDragDistance values, where it would not scroll back to page if the distanceX was < 0.
This was on line 428: } else if (parsedEvent.distanceX > 0 || parsedEvent.distanceX > 0) { I fixed to: } else if (parsedEvent.distanceX > 0 || parsedEvent.distanceX < 0) {
I also needed to know which direction the onSwipeStart was moving, so I added the direction as the 4th parameter to the onSwipeStart event. This would be beneficial to onSwipeEnd as well.