Gavin,
I think the following will allow you to "fix" the problem where the browser
window gets bigger everytime a new document is loaded:
http://koala.ilog.fr/batik/mlists/batik-users/archives/msg03075.html
Now the question is, will the "feature" described in the link above be turned into a
user-configurable property with the final release of batik 1.5? Anyone care to take a
stab at this question? Thanks!
-Shawn
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 01, 2003 7:02 PM
To: [EMAIL PROTECTED]
Subject: RE: JSVGCanvas.setURI() vs. JSVGCanvas.setSVGDocument()?
Hi Vincent,
While you are looking, I think I have identified another problem with
setSVGDocument() and one without it. First when I test my application with
1.5b5 I got a problem where the browser window would get bigger everytime I
loaded a new document. Now with setSVGDocument() removed this does not
happen.
Second with setSVGDocument() remove scripts don't work properly. A code
snippet is below
Element svgDocRoot = mainSvgDoc.getDocumentElement();
Element anotherRoot = anotherSVGDoc.getDocumentElement();
AbstractNode abstractNode = null;
int ctr = 0;
for( Node n=anotherRoot.getFirstChild(); n!=null; n = n.getNextSibling){
if( n.getNodeType() == 1 ){
abstractNode = (AbstractNode)svgDoc.importNode((AbstractNode)n,
true);
abstractNode.setOwnerDocument(svgDoc);
Element e = (Element)abstractNode;
svgDocRoot.appendChild(e);
}
}
All our other documents essentially consist of
<svg>
<script>
....
</script>
<g>
....
</g>
</svg>
So the above code should place both the <script> node and the <g> node into
the main dom tree. However without setSVGDocument() the functions in the
<script> section cannot be found by calls withing the <g> section.
I suspect the functions of the script node are not being registered in the
"mainSvgDoc" when the node is transfered. The above behaviour is both in b5
& b4.
Gavin Walker
CSIRO, Canberra
Australia
---------------------------------------------------------------------
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]