Thanks for the the tip, Thomas. It's a bit inconvenient because I use the inner svg as a container for other SVG documents being loaded after user interactions. The consequence is that I have to alter their svg width height attributes as well.
The real world coordinates were choosen because the application is a used as layout compoment for printing. - Sascha thomas.deweese wrote: > > Hi Sascha, > > "Sascha L. Teichmann" <[EMAIL PROTECTED]> wrote on 12/11/2006 > 08:39:59 AM: > >> I want to to simulate a virtual paper sheet as drawing background by > loading >> following SVG at program startup to my JSVGCanvas. The JSVGCanvas >> is embedded in a JSVGScrollPane. The JSVGScrollPane is in JPane which >> is in a JFrame. Everything is right till I'm going to resize the JFrame > and >> scroll around with scrollbars of the JSVGScrollPane ... The inner svg >> suddenly sticks to to upper left corner and the intended inset vanishes. > > I would strongly suggest that you use viewBox to establish the > interior coordinate system and then abandon the use of real world > units (like 'mm') in all but the outermost SVG elements width and > height: > > <svg width="230mm" height="317mm" > viewBox="0 0 230 317" > version="1.1" xmlns="http://www.w3.org/2000/svg"> > <svg width="210" height="297" x="10" y="10" > id="viewer-layout-sheet-svg" > overflow="visible"> > <rect x="0" y="0" width="210" height="297" > style="fill:white" > id="viewer-layout-sheet-svg"/> > </svg> > </svg> > > >> <svg width="230mm" height="317mm" version="1.1" >> xmlns="http://www.w3.org/2000/svg"> >> <svg width="210mm" height="297mm" x="10mm" y="10mm" >> id="viewer-layout-sheet-svg" >> overflow="visible"> >> <rect x="0" y="0" width="210mm" height="297mm" >> style="fill:white" >> id="viewer-layout-sheet-svg"/> >> </svg> >> </svg> >> >> At >> >> -- >> View this message in context: http://www.nabble.com/Nested-svgs-and- >> JSVGScrollPane-tf2794054.html#a7794851 >> Sent from the Batik - Users mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> > > -- View this message in context: http://www.nabble.com/Nested-svgs-and-JSVGScrollPane-tf2794054.html#a7824089 Sent from the Batik - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
