title: svg-pan-zoom pan/zoom to any object
body: <p>I'm using the svg-pan-zoom code <a href="https://github.com/ariutta/svg-pan-zoom" rel="nofollow noreferrer">https://github.com/ariutta/svg-pan-zoom</a> to make an svg map of some kind, now it is time to add a feature to pan &amp; zoom to an art component of the svg on a click event. However, I'm not sure how to use the panBy() function to get to a desired svg art item: I tried to use the getBBox() on the group I'm looking to pan to and use that with the panZoomInstance.getPan() and getSizes() information, but my experiments are not working out.
  I'd like to accomplish the same king of animation as their example (<a href="http://ariutta.github.io/svg-pan-zoom/demo/simple-animation.html" rel="nofollow noreferrer">http://ariutta.github.io/svg-pan-zoom/demo/simple-animation.html</a>) but center the viewport to the item.</p>