swiper icon indicating copy to clipboard operation
swiper copied to clipboard

loop + fractional `slidesPerView`, e.g., 1.3 has several problems => Wrong first slide, bullet index is off, missing next slide

Open jakobadam opened this issue 2 years ago • 0 comments

Check that this is really a bug

  • [X] I confirm

Reproduction link

https://codesandbox.io/s/swiper-centered-auto-angular-forked-fo69uk?file=/src/app/app.component.ts

Bug description

Loop mode doesn't work as expected in Angular. Setting slidesPerView to a fractional number breaks several things.

<swiper
      [slidesPerView]="1.3"
      [centeredSlides]="true"
      [loop]="true"
...
  1. Wrong first slide + 2. bullet index off image

  2. Missing next slide (occurs circa after one round) image

Expected Behavior

Like it does in React, https://codesandbox.io/s/swiper-centered-auto-react-forked-9sx5pe?file=/src/App.jsx

Actual Behavior

No response

Swiper version

8.0.6

Platform/Target and Browser Versions

Chrome

Validations

  • [X] Follow our Code of Conduct
  • [X] Read the docs.
  • [X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
  • [X] Make sure this is a Swiper issue and not a framework-specific issue

Would you like to open a PR for this bug?

  • [ ] I'm willing to open a PR

jakobadam avatar Sep 02 '22 09:09 jakobadam