v3.0.0
This is a major version release. Certain API methods calls are not compatible with version 2.3.x.
New API methods and configuration options are added.
Main changes are:
- Zoom is now relative to initial SVG zoom scale
- Improved viewport selection/creation. It is now possible to specify your own CSS selector for viewport.
- Ability to override mouse and touch events. An example is available how to use svg-pan-zoom with Hammer.js. Any other library that processes events may be used.
- Ability to cancel pan and zoom from before callbacks
destroy
API methodupdateBBox
API method for cases when SVG content changes and viewport bounding box is changedgetSizes
API method that exposes some internal state values (useful for customizations)refreshRate
configuration option. Usingwindow.requestAnimationFrame
by default (if available).