简体   繁体   中英

Zooming/Panning gestures within a div

I'm looking for a library that provides mobile panning and zooming gestures on content within a div. The div itself should have a fixed width and height, but its content can exceed its size which means it must support overflow scrolling. Overflow scrolling using a pan gesture should work for all zoom levels.

I only need to support browsers on modern touch devices, eg iOS 9+.

The webpage itself has its zoom/pan disabled via a meta tag attribute so zooming/panning will be done only within divs.

I looked at svg-pan-zoom , jquery.panzoom , and a few others like them, but I only found libraries that support images. I need a library that supports arbitrary HTML content.

This links to a library that can help: http://www.jqueryscript.net/zoom/jQuery-Plugin-For-Panning-Zooming-Any-Elements-panzoom.html I assume you want the zooming to be done with buttons, though if you wanted to do something like zooming with the scrollwheel this might be able to handle that too. Also works with any element (including divs)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM