splide icon indicating copy to clipboard operation
splide copied to clipboard

How to set only one slide is moved when swiping or dragging

Open ttnbtfy opened this issue 1 year ago • 5 comments

Checks

  • [X] Not a duplicate.
  • [X] Not a question, feature request, or anything other than a bug report directly related to Splide. Use Discussions for these topics: https://github.com/Splidejs/splide/discussions

Version

4.1.4

Description

Option perMove: 1 not works with type: 'loop' if deep drag on desktop or fast swipe on mobile.

Check my image: Imgur

You can see: when i drag to change the slide, slide 1 always repeat.

Reproduction Link

https://codepen.io/notrealdev/pen/WNYLyZX

Steps to Reproduce

  1. Add 2 slide
  2. Add options { type: 'loop', perPage: 1, perMove: 1 }
  3. Long drag on desktop and fast swipe on mobile

Expected Behaviour

Only one slide swipe on mobile ( or 1 slide change when dragging on desktop )

ttnbtfy avatar Aug 01 '23 07:08 ttnbtfy

+1. Just looking for this as well!

asjustis avatar Aug 04 '23 10:08 asjustis

same here with { perPage: 1, perMove: 1 }

notrealdev avatar Aug 05 '23 02:08 notrealdev

Same issue with { perPage: 2, perMove: 1 }

Alex-Varga avatar Sep 15 '23 11:09 Alex-Varga

try to change params: flickMaxPages, flickPower. all params in my slider: new Splide(elms[i], { type: 'loop', arrows: false, autoHeight: true, preloadPages: 2, flickMaxPages: 1, flickPower: 30, rewindByDrag: false, rewind: false, perMove: 1, perPage: 1, }).mount();

kiros-albatros avatar Oct 27 '23 13:10 kiros-albatros

in react?

not-AdityaRawat avatar Apr 11 '24 13:04 not-AdityaRawat