swipebox
swipebox copied to clipboard
Enable image zoom
Hi, Would be great if images larger than the "viewport" could be pinch-zoomed...
that would be great. Any chance this will be built into the project?
Please can we make this happen?
Yes, please. From an initial peek I'd guess this could be handled by not stopping propagation/default behavior of the touchstart and touchend, but I'm not sure what implications that would have. @brutaldesign any ideas how we might do this? I'm happy to try via Pull Request if you can lend some guidance.
+1
+1
:bump: Any advice?
Yea, that feature would single-handedly make this the best mobile swipe plugin out there. Any guidance would be much appreciated.
Go @brutaldesign! Any place I can donate to make this happen?
+1
+1
Yea, that feature would single-handedly make this the best mobile swipe plugin out there. Any guidance would be much appreciated. -matthewbowers
+1
Hi, I've developed the pinch-zoom feature on swipebox v.1.4.1 It works fine on iOS and Android devices. However, I'm not skilled on grunt things, so I've released the patch here: https://www.itala.net/blog/art-8-pinch-zoom-per-swipebox I've identified the modified code with special tags, so that the patch can be easily applied to the official release or on future releases. Please feel free to pull the patch on the official release.
:+1: @clixclix2! I've tested your patch...it works nice for images but I can't say the same for the videos (Youtube and Vimeo).
After zooming on a video I wasn't able to zoom back to the original size and many times the OS crashed :worried:
Tested on: iPhone 4s - IOS 9.0 iPad Air - IOS 8.1.1
Maybe I would deactivate this feature for videos... What do you think?
@leopuleo Zooming video's is a new feature in iOS9, so if it works, I would say we should keep it. :)
@paales and @clixclix2 Unfortunatelly it's not working...
Here the situation:
- I click on the video link
- The video open in SwipeBox, the video is paused
- I zoom on it and I can't zoom back
- I open it again in SwipeBox, I play the video
- The zoom is not working
Still, It would be very nice feature to have... :smile:
@leopuleo I'm sorry, I didn't test it on videos. Anyway, I think that zooming a video is a strange behaviour. I think that the best "solution" is to modify the patch in order to inhibit the zoom on videos.
@clixclix2 Could you please create a PR to allow to implement this awesome modification in our codes more easily?
Thanks a lot! :+1:
+1
Hi everyone, I rebased the code on v1.4.4 if anyone find this still helpful 4 years later. I forked the repo: https://github.com/koko-ng/swipebox
Hope it's helpful to someone
Hi everyone, I rebased the code on v1.4.4 if anyone find this still helpful 4 years later. I forked the repo: https://github.com/koko-ng/swipebox
Hope it's helpful to someone
Hi... just tried to implement your idea... But getting error.
Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive. See https://www.chromestatus.com/features/5093566007214080 preventDefault @ jquery-2.1.0.min.js:3 dispatch @ jquery-2.1.0.min.js:3 r.handle @ jquery-2.1.0.min.js:3
Also found an UI issue that if you touch an image while Swipebox is open with two fingers, image is flickering. Can you look in to that...
I should have seen the date of the post before trying to implement the patch :'(