/zoom

Javascript library to do pinch zoom that preserves scale and rotation correctly.

Primary LanguageJavaScript

zoom

Javascript library to do pinch zoom that preserves scale and rotation correctly.

Pinch to zoom, rotate and translate. Double Click to reset.

GZIP size of library is about 610 bytes.

For a DEMO check this: http://anitasv.github.io/zoom.html

Example


<style> .crop { overflow : hidden; } </style>
<div class="crop" width=202 height=270>
<img id="myImage" width=202 height=270 src="image.jpg">
</div>
<script type="text/javascript" src="zoom.min.js"></script>
<script type="text/javascript">
var zImg = new Zoom($('#myImage'));
// zImg.reset(); can be used to reset the zoom.
</script>