Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the usage of longSwipes and shortSwipes config in swiper?

When I read the swiper's docs, I can not get what's the usage of longSwipes. Can anyone tell me ? It's best to give an example. Thanks. https://swiperjs.com/swiper-api#swiper-full-html-layout

enter image description here

like image 310
chesszhang Avatar asked Nov 15 '22 22:11

chesszhang


1 Answers

Old post but here are my findings...

By default shortSwipes moves to the next slide with a very short swipe distance. Long swipe moves to the next slide when the current slide is dragged > 50% of the view.

When setting shortSwipes to false, you now have to drag the slide more than 50% of the view to advance to the next/prev slide.

When setting longSwipes to false, you now can only advance to the next/prev slide with a very short drag.

When setting both shortSwipes and longSwipes to false, swiping becomes disabled.

like image 110
McLovin Avatar answered Dec 28 '22 09:12

McLovin