-
-
Notifications
You must be signed in to change notification settings - Fork 224
Feature request: allow pinch to zoom in/out #73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I just figured out what was causing the pinch to zoom to be missing. I thought it was being prevented on the drag events, but apparently it's the I'll make that an option on my components, to conditionally enable/disable that behaviour. Closing this issue, unless we want to make that an option that developers can disable based on use case |
@ruijdacd have you managed to implement pinch-zoom inside a slide? |
Just noticed this while using keen-slider on mobile. Found a related issue: #237 It includes a reference to a 7 month PR. What I ended up doing is, remove the import Added Zoom is no longer ignored. The PR however has Javascript code that disables the sliding while zooming:
Which translates to, if you are doing a touch event with more than 1 finger, don't let it drag the slide. Which seems essential for a great User Experience. I think the CSS only approach, no update to library is a step in the right direction, hence sharing the approach here. |
We should allow the user to be able to perform a pinch to zoom action on the slide.
In order to do this we could detect the amount of
touches
on themousedown/touchstart
andmousemove/touchmove
and if that value is equal to 2 (indicating that the user is using 2 pointing devices, fingers in most cases), we can return early from the function and keep the browser behaviour.If this doesn't clash with anything you are working on, or with future plans with the library, I would be happy to raise a PR for this
The text was updated successfully, but these errors were encountered: