Reputation: 1436
I am using angular2-useful-swiper
wrapper for iDangerous Swiper
for a project and I need to disable the swiping functionality when the image is zoomed.
In Swiper Api there is nothing about this, so the question: is it possible?
Upvotes: 1
Views: 1024
Reputation: 21
as a work-around, you could subscribe to swiper's 'zoomChange' event and based on the scale (one of 3 args of it) update the mySwiper.allowTouchMove
to false
.
that worked for me in the Vue app.
my use-case
yourCallbackToEvent(scale) {
yourSwiper.allowTouchMove = scale === 1;
};
Upvotes: 1