voronianski / swipe-js-iso

Universal (a.k.a isomorphic) version of Swipe.js
https://www.npmjs.com/package/swipe-js-iso
MIT License
187 stars 57 forks source link

Added callback that is invoked while swiping is in progress #2

Closed matthewgertner closed 8 years ago

matthewgertner commented 8 years ago

It is very useful to be able to track progress while the user is swiping. For example, we might want to animate some other screen elements during swiping. This simple pull request makes it possible for the developer to receive notifications while swiping is in progress. The swiping callback is invoked with a number between 0 and 1 representing the percentage of the full width that has been swiped (e.g. 0.5 means that we are halfway between two tiles).