You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`const swiper = new Swiper('.swiper-container', {
I'm trying to fix an issue where my swiper swipes too far off to the right, way past the last of four slides. The preference is to have the swiping stop once the rightmost slide is in full view, but instead it keeps on swiping to where there's nothing but the background. All the slides are hidden off to the left.
In trying to figure this out, I noticed my swiper-wrapper and swiper-slide divs are 4x as wide as they should be. I'm wondering if it's possible to fix these initial widths and if that would fix the issue.
Here's my JS. Sorry for the bad formatting. Most these setting were added as a result of trying to fix this issue.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
`const swiper = new Swiper('.swiper-container', {
I'm trying to fix an issue where my swiper swipes too far off to the right, way past the last of four slides. The preference is to have the swiping stop once the rightmost slide is in full view, but instead it keeps on swiping to where there's nothing but the background. All the slides are hidden off to the left.
In trying to figure this out, I noticed my swiper-wrapper and swiper-slide divs are 4x as wide as they should be. I'm wondering if it's possible to fix these initial widths and if that would fix the issue.
Here's my JS. Sorry for the bad formatting. Most these setting were added as a result of trying to fix this issue.
const swiper = new Swiper('.swiper-container', {
init: true,
height: 600,
stopOnLastSlide: true,
observer: true,
observeParents: true,
observeSlideChildren: true,
resistance: true,
resistanceRatio: 0,
spaceBetween: 30,
allowSlideNext: false,
freeMode: true,
resizeObserver: true,
setWrapperSize: true,
watchSlidesVisibility: true,
watchSlidesProgress: true,
breakpoints: {
1230: {
allowSlideNext: true,
resistanceRatio: 0,
},
},
});
Beta Was this translation helpful? Give feedback.
All reactions