panzoom
panzoom copied to clipboard
Getting transform from attribute or style before panning or zooming.
Fixes an issue when I changed the transform matrix directly by CSS, and panzoom remembering its position regardless of CSS changes. Basically, before any action (eg. mouse drag), the transform object is created from element's style (in case of DOM) or attribute (in case of SVG).
Added method getTransform
to svgController
and domController
, and assigned its return value to transform
in every action that triggers a pan or zoom.