Hi Kalle,

   Tried it again as you said, no problems for me.
Two points - first I am running CVS not 1.5 so you might try updating
(although from memory I can't think of any fixes in this area), second
the way the example is coded if you move the cursor too quickly it will
'come off' the circle and your motion listener will stop being called -
(the easiest way to fix this is to add the motion listener to the
rect as well), don't confuse this with the resize not working.

   Finally I ment to mention that while this does work in Batik
it is extremely inefficent.  In order to ensure that elements that
are using percentages are rendered correctly we dispose the entire
rendering sub tree and rebuild it when the x/y/width/height of a
viewport changes - in this case that is the entire document.  So this
is fine for simple documents or something that happens infrequently
but don't count on good performance if you do this frequently in a
complex document.

Kalle Kilpi - BL wrote:
Thanks for your quick response Thomas.

I added a rectangle to see the size of the canvas, but still got
a problem:

If I open the example file in Batik/Squiggle and resize the window to
full-screen size, the canvas is being resized on the fly when I drag
the circle, but its resized only with-in the boundaries of (/not any
larger than) the original width/heigh of the document.

However, if I click zoom-in and then zoom-out, the canvas resizes
perfectly after that(also over the original size of the doc).

Thanks,
Kalle
-----Original Message-----
From: Thomas DeWeese [mailto:[EMAIL PROTECTED]
Sent: 19. elokuuta 2003 22:26
To: Batik Users
Subject: Re: FW: Changing the size of the document dynamically


Kalle Kilpi - BL wrote:


Hello everyone,

Is it possible to change the size of the root svg document dynamically as
with Adobe SVG Viewer (by just modifying the DOM)?

I have attached a sample file where the dynamic resizing is done with
embedded JavaScript, though
in real use we would have to implement the resizing natively in the
application hosting JSVGCanvas.
(I'm new in here and don't know is it allowed to send attachments to the
list, so please notify me
if it isn't)

The example resizes the canvas on the fly when using Adobe's SVG Viewer,

but


doesn't do it in batik.


    It does for me, you might not see it because the canvas is fully opaque.
Try adding a rect with width/height="100%".  The window doesn't resize but
then again it doesn't resize in IE either.


Help would be highly appreciated.

Best regards,
Kalle


------------------------------------------------------------------------


---------------------------------------------------------------------
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]


--------------------------------------------------------------------- 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]



Reply via email to