loryjs / lory

☀ Touch enabled minimalistic slider written in vanilla JavaScript.
http://loryjs.github.io/lory/
MIT License
2.28k stars 243 forks source link

On TouchScrolling, snap to next visible slide #751

Closed davidglezz closed 5 years ago

davidglezz commented 6 years ago

When we have multiple slides (by example, variable width example), and we move several slides (touching or with mouse) only one advances, the expected behavior would be go to the next visible slide in the direction of displacement.

nstanard commented 5 years ago

Please put together a demo/example and put a link in the comment. (perhaps a github repo that I can download and test - or simply a codepen link)

edit: I'll be closing issues like these over the next few days if there is no response.

davidglezz commented 5 years ago

video

I slide to slide 130, but when I release my finger, it returns to 190, the next of the first (220), the expected behavior is to stay at 130 or the nearest one when I release my finger.

nstanard commented 5 years ago

I'm not sure that is the expected behavior. slidesToScroll is an option available and it's default value is 1. That example is going to snap to 1 slide at a time. That's actually not a bug.