George Armhold wrote:
Thomas DeWeese wrote:
> I'm not 100% sure that I understand what you want to do so let me > know if I've missed something important.
I want to know when the doc is fully loaded into the canvas, and ready for updates by modifying the DOM programmatically. [...]
To keep the rest of my code simple, I wanted my CanvasCache to worry
about canvas creation and blocking until the UpdateManager is
available. [...] This way clients of the cache can request and immediately use canvases without worrying about whether
the UpdateManager was ready yet or not.
Well unfortunately the current design of the canvas doesn't support this without some hacks. The UpdateManager is never available until after the first rendering. It's worth noting that you may want to trigger a rendering anyway as some additional work is done during the first rendering of the tree (for example I think text is actually laid out during the first render).
But for this waitUntilLoaded to work, the canvas must first be made visible. Which means either I have to fake out Batik by displaying my canvas in a hidden frame somewhere, or I have to move push the call up into my client code somewhere, which I was hoping to avoid.
I think the reason the canvas doesn't render is because it's size is zero not because it isn't shown. If you set the canvas size (say to 10x10 or something) before adding the document it should render.
---
> If you want the update manager so you can twiddle the document you > can (and should) do this in an onload DOM event handler (perhaps > attached after document load) or in one of the svgLoadEventDispatch > callbacks (so if you do it in the Completed call you will know that > any 'in document' onload handlers have run and completed).
Yes the goal is in fact to twiddle the DOM. But I don't quite understand what you mean by "onload DOM event handler"... JavaScript?
Just like you would add a 'onclick' java event listener to the document you can add a 'onload' java event listener. This is an opportunity to modify the DOM before the first rendering but this really isn't what you want.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]