Hi Gavin,

Thanks for sending a test case for the setSVGDocument issue earlier this week. I see that there has already been a response to the size changes issues by Shawn and Thomas.

Regarding the <script> insertion issue, if you look at the bridge's UpdateManager code, you'll see that we only load scripts upon dispatching the SVGLoad event. Modifications or removal of a <script> element do nothing and additions of a <script> element does nothing either (that is, after the document has been loaded).

Regarding the issue you have initially reported with setSVGDocument (and for which you sent a test case), I have not had a chance to look into it yet and I'll enter a bug in Bugzilla as I may not be able to look into it before a while.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18640

Thanks,
Vincent.

[EMAIL PROTECTED] wrote:
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]



Reply via email to