Swiper Zoom issue and zoom panning problems with <picture> elements #4350
Unanswered
risticmladen
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
Currently, I've implemented Swiper.js on my web site for some time and the slider works just fine.
But today I've tried to implement zoom to the slider. And I think that I found the bug.
I've noticed that when the zoom is triggered on the image,
maxRatio
and/ordata-swiper-zoom
attribute are ignored.The images will be zoomed to the default level (3 times scale is the default). And not on the value which is specified.
Also, the second thing, when the image is zoomed, up and down panning doesn't work properly.
My HTML markup is:
In order to have functional zoom I need to have container
By default, it expects to zoom one of the img, picture or canvas element. Right?
But what if we have two or more image sources inside
I've also tried this:
and this:
When I use just one image inside swiper-zoom-container, then zoom and panning work fine.But that isn't a good option for me. I need to use different sources by breakpoint.
Do you have some suggestion? Any other idea?Thank you.
PS I'm using the latest swiper.js version (6.5.0)
Beta Was this translation helpful? Give feedback.
All reactions