{"repo":"timmywil/panzoom","free":true,"listed":false,"github":"https://github.com/timmywil/panzoom","clone":"git clone https://github.com/timmywil/panzoom.git","description":"A library for panning and zooming elements using CSS transforms :mag:","language":"TypeScript","stars":2451,"topics":["pan","zoom","panzoom","pointer-events","svg","typescript","css"],"license":"MIT","category":"mobile-apps","readme_excerpt":"Panzoom Examples --- Panzoom is a small library ( 3.7kb gzipped) to add panning and zooming functionality to an element. Rather than using absolute positioning or setting width and height, Panzoom uses CSS transforms to take advantage of hardware/GPU acceleration in the browser, which means the element can be anything : an image, a video, an iframe, a canvas, text, WHATEVER. For common support questions, see the FAQ. Browser support Here is a list of currently supported browsers. Mobile support iOS, Android, and Windows Mobile are supported. Panzoom includes support for touch gestures and even supports pinch gestures for zooming. It is perfectly suited for both mobile and desktop browsers. It uses pointer events by default wherever supported. SVG support Panzoom supports panning and zooming SVG elements directly. In IE11, CSS animations/transitions do not work on SVG elements, at least for the transform style. They do work in other browsers. One could implement transitions manually in IE11 using the setTransform option and integrating a tweening library for javascript animations (such as tween.js). Installing With npm: With yarn: Panzoom uses UMD and can be loaded a lot of ways. With ES6 imports: With commonjs or browserify: With an AMD loader in an anonymous module: With a script tag: With a script tag from a CDN: Usage FAQ 1\\. What is transform-origin and why is it added to the panzoom element? - The transform-origin is the origin from which transforms are applied. Panzoom ","default_branch":null,"files":null,"tree":[],"storefront":"/r/timmywil","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/timmywil/panzoom/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}