react-swipeable-views icon indicating copy to clipboard operation
react-swipeable-views copied to clipboard

Question: method to detect quick move movement on the source code

Open viktor-yang opened this issue 4 years ago • 0 comments

I could't understand the code this.vx = this.vx * 0.5 + (touch.pageX - this.lastX) * 0.5; on https://github.com/oliviertassinari/react-swipeable-views/blob/master/packages/react-swipeable-views/src/SwipeableViews.js#L452. And is (lastY - firstY) / (endTime - startTime) to caculate speed OK?

Thank you very much if you can explain it to me.

viktor-yang avatar Jul 03 '20 09:07 viktor-yang