slidesToShow option is ignored in vertical mode.
I also subscribe to the issue
The issue can be fixed by changing the method "Slick.prototype.getSlideCount" and adding a checking for vertical mode.
My solution is:
Slick.prototype.getSlideCount = function() {
var _ = this,
slidesTraversed, swipedSlide, centerOffset,
isSwiped;
centerOffset = _.options.centerMode === true ? _.slideWidth * Math.floor(_.options.slidesToShow / 2) : 0;
if (!!_.options.verticalSwiping) {
isSwiped = function(slide) {
return (slide.offsetTop - centerOffset + ($(slide).outerHeight() / 2) > (_.swipeLeft * -1))
}
} else {
isSwiped = function(slide) {
return (slide.offsetLeft - centerOffset + ($(slide).outerWidth() / 2) > (_.swipeLeft * -1));
}
}
if (_.options.swipeToSlide === true) {
_.$slideTrack.find('.slick-slide').each(function(index, slide) {
if (isSwiped(slide)) {
swipedSlide = slide;
return false;
}
});
slidesTraversed = Math.abs($(swipedSlide).attr('data-slick-index') - _.currentSlide) || 1;
return slidesTraversed;
} else {
return _.options.slidesToScroll;
}
};
I just tried pptp's solution and it works perfectly
I cannot reproduce what the exact problem is. Slides to show and vertical works here: https://jsfiddle.net/1a8ewgef/
Closing. Please add more information and a JSFiddle example to reopen
mcashley, vertical slides are not scrollable in this example
To reproduce the problem: make the viewport narrow to make slides be vertical and try to scroll them by touch
Can confirm this still seems to be an issue? I have 6/7 slides with this code:
$('.featured-dealer-reviews').slick({
arrows: false,
slidesToShow: 3,
vertical: true,
verticalSwiping: true
});
yet all 6/7 are shown with the last one having the last 30px or so cut off and displayed before the first slide? may be some CSS issues?
(using Bootstrap, Wordpress and FontAwesome libraries)
I tried setting slidesToShow to 2 and it seemed to work better, not perfect (a little slide overlap, nothing CSS can't fix) - but setting back to 3 shows 4?
Setting above with centerMode: true makes it work way much better, no overlapping of slides. Still shows 4 with 3 set though - but better for sure.