I am using the ariutta svg-pan-zoom library(https://github.com/ariutta/svg-pan-zoom).
I am trying to pan to a specific shape at (x:1000, y:20) when the user clicks a button. I would also like the image to centre at this point.
The Problem I am facing is the point I am trying to pan and centre at goes off the screen.
I am currently using:
panZoom.pan({x:1000, y:20});
but this does not work.
Please see the jsFiddle for more info: http://jsfiddle.net/arjSharma/n6r55dp1/2/
Can anyone help with my problem?
Thanks