PinchZoom

PinchZoom is an open-source JavaScript library that adds pinch-to-zoom gestures to an element on touch devices. It handles the gesture math — scale, pan bounds, snapping back — that a browser exposes for a whole page but not for an arbitrary piece of the DOM inside it.

Documented at https://github.com/manuelstofer/pinchzoom.

How We've Used It

One gated build uses it: the product media gallery, where zoom is split by input type. Pointer devices get a hover zoom pane; touch devices get pinch gestures on the image itself. Loading the touch library only where it applies keeps the pointer path free of a gesture handler nothing on it will ever fire, and it lets the two zoom behaviors be tuned separately instead of collapsing into one compromise that suits neither.

Builds Using It

No page in this batch covers a build on it yet. One gated build uses it; its page follows.

Related Entities

Our Role

Integration. We initialize the library on touch devices inside our own gallery; the library is open source and stays as published.