What Is Svg-pan-zoom. JavaScript library that enables panning and zooming of an SVG in an HTML document with mouse events or custom JavaScript hooks. Introduction Since SVGs are infinitely scalable it can be useful to add controls to pan and zoom particularly to maps.
SVG images can be used as background-image in CSS as well just like PNG JPG or GIF. As a image with the possibility to zoom and drag the image by mouse. As for zoompan I have recently tested Ariutta svgPanZoom and find it has a nice mousewheel zoom.
I think something that output some JS to make the experience smoother into the svg or into an html output would be a reasonable feature request.
The zoom should preferbly fit perfect just as in the example above. SVG Animated Rect. Ready to zoom in zoom out and pan around your SVG. An often overlooked technique with SVG animation is animating the viewBox attribute.