question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incorrect slide selection when centeredSlides = false, slidesPerView > 1

See original GitHub issue

There’s some error in the number of slides that can be selected when centeredSlides = false and slidesPerView > 1

The result seems to be something like this (I’m not really sure): available slides = total number of slides - slidesPerView + 1

I found it when implementing a variant of thumbs-gallery demo, so I’ve made a testcase using it: http://jsfiddle.net/rfc1en11/

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

5reactions
Rikkcommented, Mar 5, 2015

No, it is normal behavior how it is now, it is just your case which is not default one and pretty specific

How could one think two options can’t work together if there is nothing about it anywhere?

it is normal behavior how it is now

How would one know what is or isn’t normal behavior if all documentation available is an API page and Demos?

1reaction
nolimits4webcommented, Mar 5, 2015

That is how Swiper works, control doesn’t work based on slide indexes it works on a percentage divider between (maxTranslateParent - minTranslateParent)/(maxTranslateChild - minTranslateChild). So when centeredSlides = false, you can’t move thumbs to the most right slide that is why those multiplication percentage became different

Here is solution http://jsfiddle.net/1gLna398/8/

Read more comments on GitHub >

github_iconTop Results From Across the Web

Swiper slider not working as expected with loop: true and ...
When a thumbnail or a navigation arrow is clicked the main slider doesn't show the active thumbnail, i searched and didn't found any...
Read more >
Swiper with lazy loading and auto slides per view does not ...
Problem : next images in view are never loaded and when I slide it to ... loadPrevNextAmount: 2, }, centeredSlides: false, //added this...
Read more >
SwiperOptions | Swiper - v8.4.5
Set to false to disable swiping to next slide direction (to right or ... const swiper = new Swiper('.swiper', { // Default parameters...
Read more >
Need help with swiper js - Custom code - Forum | Webflow
Hello Ezra, I have a problem with showing 2 or more different sliders on one page. How do I have to change the...
Read more >
Ion-Slides: Mobile Touch Slider with Built-In & Custom Animation
Ion-Slides is a multi-section container which offers custom and built-in mobile touch slider animation effects. See how Ion-Slides works with iOS and ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found