Pinch zoom was added to <amp-lightbox-viewer> (now <amp-lightbox-gallery>) in https://github.com/ampproject/amphtml/pull/12219. This FR is to backport it to <amp-image-lightbox>.
<amp-image-lightbox> and test it locally. ngrok to proxy localhost. <amp-image-lightbox> opens up an image in full screen mode. On mobile phones, people can use double tap to zoom in on the image. We want to also allow people to zoom in and out via pinch.
The source code for amp-image-lightbox is located at extensions/amp-image-lightbox/0.1/. The manual test is located at test/manual/amp-image-lightbox.amp.html. Take a look at https://github.com/ampproject/amphtml/pull/12219 and the component amp-image-viewer. This contains an implementation of pinch zoom that can be ported back to amp-image-viewer.
closes Issue #9891 in the description and tag @cathyxz for review. Once approved, your changes will be merged. ⚡⚡⚡Congrats on making your first contribution to the AMP Project!⚡⚡⚡ You'll be able to see it live across the web soon!
Thanks, and we hope to see more contributions from you soon.
If you have questions ask @cathyxz in this issue or on your Pull Request (if you've created one) or see the How to get help section of the Getting Started guide.
I assumed this was fixed with https://github.com/ampproject/amphtml/pull/12219 but pinch-zoom doesn't appear to be working at all right now in AMP version 1519774160068 .
Samples:
Tested UserAgents:
@mattwomple yup, we added it to the new lightbox component <amp-lightbox-gallery>. Didn't backfill it to <amp-image-lightbox> yet. You can implement it in pretty much the exact same way as #12219 (the <amp-image-lightbox> component has an internal ImageViewer class. I'm trying to wrap up and launch <amp-lightbox-gallery> soon, which should deprecate <amp-image-lightbox>, but happy to take a contribution if you want this right now.
Hello, I would like to claim this as a first issue. Is it available? I am a first-time contributor to any open source @cathyxz
It's all yours. =) Feel free to ping me here or on slack if you run into any issues. If you join the project per https://github.com/ampproject/amphtml/blob/master/CONTRIBUTING.md, it allows me to assign the issue to you.
@cathyxz I don't have experience working with a large code base. I was able to get through all the steps to get AMP up and running, but is this the place to see my changes as I debug remotely? http://localhost:8000/test/manual/amp-image-lightbox.amp.html
Yup!