资 源 简 介
SVGPan is a a JavaScript library to zoom, drag and pan SVG images.
Some time ago the need for a browser-compatible vectorial language pushed me to consider the SVG markup language (I won"t say anything about Internet Explorer - it"s just unsupported there). The language itself is great, but, as a beginner, I was so disappointed about the fact that on the Internet I couldn"t find ANY library ready to use for panning and zooming features that I had to write one from scratch.
The SVGPan library features:
Panning (pan à la Google maps) (click on the white background and pan)
Zooming (using the mouse wheel)
Element dragging (click on a drawing element and drag it somewhere else)
Combinations of the above like zooming while dragging
The resulting javascript library is published here, in the hope that someone can find it useful. The library itself is very small and easy to use; and it"s lice