I wrote :

> The 'onload' event handler is not enough, because the user actions can
> dynamically change the size and position of elements in the inlined svg.
> I need to recompute the viewBox every time this happens.
> What I do now is that I register an UpdateManagerListener, and when I
> detect that the viewBox needs to be recomputed, I trigger the
> computation from the updateCompleted() callback. As everything in the
> inlined svg is under a <g> element, I just take its bounding box and set
> the viewBox to match it. The problem is that is a two passes rendering.
> It's suboptimal, and the UI doesn't feel responsive (the intermediary
> state can be seen). Is there a way to do this in just one pass ?

Ooops, I totally missed the fact that the bounding box information was
directly available after my calls modifying the DOM. It's indeed trivial
to do it in one pass.

Thanks Thomas, and sorry for the noise,
Thomas



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to