A web component for pinch zooming DOM elements.
Usage
npm install --save-dev pinch-zoom-element
Hello!
Now the above can be pinch-zoomed!
API
Hello!
Properties
pinchZoomx; // x offsetpinchZoomy; // y offsetpinchZoomscale; // scale
Methods
Set the transform. All values are optional.
pinchZoom;
Scale in/out of a particular point.
pinchZoom;
Demo
Simple image pinch-zoom. Although you can put any element in <pinch-zoom>
.
Files
lib/index.ts
- Original TypeScript.dist/pinch-zoom.mjs
- JS module. Default exportsPinchZoom
.dist/pinch-zoom.js
- Plain JS. ExposesPinchZoom
on the global.dist/pinch-zoom-min.js
- Minified plain JS. 2.3k gzipped.