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
Hey! I'm struggling with this one for quite some time as I have no idea how to even form my question. Tried googling for it, tried with chatgpt but without any luck.
I'm basically trying to make my swiper instance to not be limited by parent container vertical borders but only after initial swipe. When rendering it initially, left side should be limited to parent but right - not. It's quite hard to put that into words so let me use a Zalando example.
Initially, when you visit their homepage, slider items goes beyond the right side of the screen while left side is aligned with parent page container. However, once you swipe, the left offset of swiper goes beyond the left border of the screen (so page layout left padding is ignored) and the initial offset is visible on the right side of last slide item. Here are the screenshots demonstrating that behavior (sorry, I'm not able to upload images in here for some reason).
The only thing that comes to my mind is to be listening for window resize event and applying left/right offset manually based on some other div that has proper page layout width set but I'm hoping maybe there is some sort of built in switch for that.
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey! I'm struggling with this one for quite some time as I have no idea how to even form my question. Tried googling for it, tried with chatgpt but without any luck.
I'm basically trying to make my swiper instance to not be limited by parent container vertical borders but only after initial swipe. When rendering it initially, left side should be limited to parent but right - not. It's quite hard to put that into words so let me use a Zalando example.
Initially, when you visit their homepage, slider items goes beyond the right side of the screen while left side is aligned with parent page container. However, once you swipe, the left offset of swiper goes beyond the left border of the screen (so page layout left padding is ignored) and the initial offset is visible on the right side of last slide item. Here are the screenshots demonstrating that behavior (sorry, I'm not able to upload images in here for some reason).
The only thing that comes to my mind is to be listening for window resize event and applying left/right offset manually based on some other div that has proper page layout width set but I'm hoping maybe there is some sort of built in switch for that.
Thanks in advance for any clues!
Beta Was this translation helpful? Give feedback.
All reactions