If you try to zoom in-out by 2 fingers (at slick slideshow) on Android Chrome, nothing happens.
The page zoomed
The page didn't zoom in.
Maybe i missed some settings for this feature?
Thanks!
I believe it's to do with intercepting the touches[] and preventing the default behaviour... you can try to prevent this by detecting (on touch start) if the e.originalEvent.changedTouches[] array has more than one entry, and disabling the carousel temporarily until a touchEnd event... this should allow pinch-zooming. (I think... I've done this before but with a ton more effort as I needed a custom-zoom feature which I implemented with Hammer.js)
@simeydotme nice!
Any solutions to this problem?
@ #1188
Remove these lines in slick.scss:
-ms-touch-action: pan-y;
touch-action: pan-y;
removing the touch-action property may enable the zoom but the user cannot scroll and see the left and right most part of the image when it is zoomed.
@nexxome this does nothing for me. Is there something I'm overlooking here?
@gmelikov I don't know if you still need a solution for this, but what I did and works was changing the CSS in the class:
".slick-slider": {
touchAction: "auto",
} ,
I am using styled components, that explain syntax I am using here, in this way yo don't lose scroll or swipe.
Hope this helps somebody.
Do we have the ability to set these options at initialization?
I have a scenario where we have to sliders on page, one where we want to be able to pinch-zoom and the other where we don't. Being able to pass in the pan-x, pan-y, touch-action, etc. options and not having to maintain two different css files would be ideal.
@gmelikov I don't know if you still need a solution for this, but what I did and works was changing the CSS in the class:
".slick-slider": { touchAction: "auto", } ,
I am using styled components, that explain syntax I am using here, in this way yo don't lose scroll or swipe.Hope this helps somebody.
This didn't work for me... is there an example you can share?
Most helpful comment
@ #1188
Remove these lines in slick.scss:
-ms-touch-action: pan-y; touch-action: pan-y;