Hi Leo, Leo Lim <[EMAIL PROTECTED]> wrote on 06/08/2007 05:50:30 PM:
> The current problem I have is that after zooming in using a rubber > band zoom on the corners of my svg document and subsequently zooming > out using JSVGCanvas ZoomOutAction, the document tends to drift off > center. Is there a way to anchor the svg document during these zoom > in/zoom out operations such that they won?t be off center? The ZoomIn/OutAction operations zoom in/out around the current center of the canvas. The rubber band zoom, zooms to the area highlighted (which can easily be off center). If you want a zoom out after a rubber band zoom to get you back to where you started you will probably need to implement some kind of 'zoom stack'. So before you zoom in with rubber band you can push the current Rendering Transform onto the zoom stack. Then when you go to zoom out check if there is a RenderingTransform ready and use it if there is. There are other complexities like what happens if they zoom in pan around and then zoom out? What if before any zoom in they zoom out (does that go on stack?) and then zoom in - should they get back where they started? etc... --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
