Jorg Heymans wrote:
Update:
By carefully commenting and uncommenting code i narrowed the problem down to this line where i search the new data for a particular node:
// root is an element that was created off the main SVG document using // getSVGDocument().createElementNS(null,"myns:newdata") Node n = XPathAPI.selectSingleNode(root, "//[EMAIL PROTECTED]'" + id + "']");
Uncommenting this line makes the canvas behave consistent again.
^^^^^^^^^^^^ Do you mean "commenting"?
How can XPathAPI possibly influence the canvas in this way?
It is hard for me to guess. Is this code run outside of the UpdateManager Thread?
Granted it searches a node that was created using the main SVG document, but that node is never appended to the main document.
There are some global structures that are associated with the owner document. My guess would be that these get corrupted (especially if the access is multi-threaded).
Does anyone know of a better way to search for a node by attribute ID starting from a certain parent Node?
batik.dom.AbstractDocument.getChildElementById(Node n, String id)
Or you can use SVGSVGElement.getElementById(String id)
These will search the document fragment that they are called in relation to. So the entire subtree associated with 'n' or the svg element is searched but this seems what you want. My suggestion would be to use the 'svg' element. BTW the code above you gave a prefix "myns" but didn't provide a namespace - which is a little hokey.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
