Hi Alex, Alex Orloff <[EMAIL PROTECTED]> wrote on 10/31/2005 06:49:38 PM:
> Hello All. I need some help using the JSVGCanvas class. > > What I am trying to do is figure out how to apply a transform to > translate the default view to a specific Point. One option is to use a viewBox fragment identifier. > After using setURI the document loads and displays the SVG. However, > what I want to do is translate the canvas programmatically so that the > initial viewport is centered on a specific point. I know how to invoke > a method when the appropriate listener fires a completed event, but I > don't know how to translate the view of the loaded document to an x,y > coordinate. If you want you can use currentScale/currentTranslate on the outermost SVG element to adjust the view. Finally you could call setViewingTransform to update the view of the canvas. The tricky bit is that at the end of the 'onload' event the canvas will set the transform so you need to wait until after that to insert your transform. Or else modify the way the canvas calculates the initial viewing transform (you can override calculateViewingTransform for example). > > Can anyone describe in a few steps how I would go about implementing this ? > > a thousand thanks, > > > alex > > > Alex Orloff > [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
