kenwheeler / slick

the last carousel you'll ever need
kenwheeler.github.io/slick
MIT License
28.34k stars 5.88k forks source link

Can't make a vertical draggable slider without set number if slider so scroll #4060

Open artem-tarasenko opened 3 years ago

artem-tarasenko commented 3 years ago

Hello there, I'm trying to implement a draggable image slider with a variable number of slides of a different height. It should be vertical and with drag -> scroll behavior. But no matter how I try to configure it, I can't disable 1-slide-per-swipe scroll.

If I set 4 slides to scroll and 4 slides to show, for example, there is a problem with showing the last slide, I just can't scroll to it - it always bounces back. Anyway, that is not what is needed since the height of the elements varies.

====================================================================

[ https://jsfiddle.net/pixe1/aron32L5/47/ ]

====================================================================

Steps to reproduce the problem

  1. Set a new default slider with 6-9 slides
  2. Set it vertical, verticalSwiping and swipeToSlide
  3. Test it.

====================================================================

What is the expected behavior?

swipeToSlide is expected to override 1-slide-scroll behavior and allow the user to scroll as many slides as he did with a gesture.

====================================================================

What is observed behaviour?

The slider is always bouncing back and scrolling only 1 slider, which is not the desired behavior for a slider with unfixed heights of items and, therefore, an unfixed number of items visible.

====================================================================

More Details

The main question here - is it possible to let it be scrolled freely with a drag if the images in a slider are of a different height? It appears to me that vertical mode is not so optimized as a horizontal mode which seems pretty advanced and with a lot of options.

Thanks.