Zoom clamp with photoswipe

1

Hello, I'm using a template that I bought on a website but I'm having a hard time implementing Pinch Zoom on it ...

Basically it is the following:

I have a gallery

<ul class="gallery" id="Gallery">
                <li><a href="images/paginas/10.jpg" rel="external"><img src="images/paginas/10.jpg" alt=""/></a></li>
                <li><a href="images/paginas/11.jpg" rel="external"><img src="images/paginas/11.jpg" alt=""/></a></li>
                <li><a href="images/paginas/12.jpg" rel="external"><img src="images/paginas/12.jpg" alt=""/></a></li>
            </ul>

and this is my JS to instantiate PhotoSwipe:

(function(window, PhotoSwipe){
            document.addEventListener('DOMContentLoaded', function(){
                var
                    options = {
                        loop: false
                    },
                    instance = PhotoSwipe.attach( window.document.querySelectorAll('#Gallery a'), options );
            }, false);
        }(window, window.Code.PhotoSwipe));

It loads the gallery and works great but it only zooms when I double-click the image. I would like it to work also the pinch zoom vi on the site photoswipe.com the example of it works but the code is very large and disorganized from the page so I could not find the solution.

Any ideas?

    
asked by anonymous 19.05.2015 / 16:31

0 answers