I have succeeded in panning and zooming a view containing an svg but now it just zooms to the center of the view.
I have been trying to figure out what the best way to calculate the required panning while zooming to focus on the mouse.
Would anybody have any ideas or experience with this?
1 Like
This post on stackoverflow shows you how to achieve this using a transformation matrix on a group object within the SVG itself:
Check out JSFiddle link in solution comment:
If you are able to listen for changes to the zoom level already, then implementing the JS solution above in jython might be possible.
1 Like