At the moment, I can have a button that, when clicked, will zoom in to a certain area of the svg image. However, I would like it to initially zoom in on this area as soon as the page loads without the user having to select anything. Is there a way of doing this at the moment?
but I can't call this.Viewer.setPointOnViewerCenter immediately on load because this.Viewer is undefined. I was wondering if there was a way that I could achieve a similar result, possibly by using props of ReactSVGPanZoom?
At the moment, I can have a button that, when clicked, will zoom in to a certain area of the svg image. However, I would like it to initially zoom in on this area as soon as the page loads without the user having to select anything. Is there a way of doing this at the moment?
Currently, I am using
<button onClick={e => this.Viewer.setPointOnViewerCenter(100,100,5)}>fitSelection
but I can't call this.Viewer.setPointOnViewerCenter immediately on load because this.Viewer is undefined. I was wondering if there was a way that I could achieve a similar result, possibly by using props of ReactSVGPanZoom?