Hi George,
This happens because the canvas has a zero width/height before it is added. So you should get the width and height of the Canvas that is part of the display and provide them to the canvas that isn't displayed yet. You should only need two Canvas's and just toggle them.
George Armhold wrote:
I tried it. The speedup is quite impressive when changing cached JSVGComponents vs re-using a single component and calling setSVGDocument. One small problem- when "prepping" the cached canvases, I call setSVGDocument() before they are added to any component. This seems to result in the document being rendered with the upper-left corner of the doc square in the middle of the canvas, when add() is eventually called. What is the proper way to install an SVGDocument "off screen", so to speak? If I do a setSVGDocument(getSVGDocument()) it fixes the problem, but of course this defeats the point of caching.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]