I have a problem with my application that I can't reliably reproduce,
but it happens rather frequently.

 

I have a bunch of elements on a JSVGCanvas.  I've wired up DOM
EventListeners so I can drag and drop the elements around the
JSVGCanvas.  Every once in awhile, an element will be moved, but not
show as moved on the JSVGCanvas.  It's like the JSVGCanvas doesn't
repaint itself.  However, other elements on the JSVGCanvas will move and
update their position accordingly.  I can drag and drop element A
successfully then try and drag and drop element B.  The move is
"successful" in that the document is updated, but the JSVGCanvas is not
updated.  Nonetheless, I can continue to drag and drop elements A, C,
etc.

 

It's like one element gets "stuck" canvas-wise, but not document-wise.

 

"Refreshing" the JSVGCanvas by calling JSVGCanvas.setSvgDocument(...)
resolves the problem and the "stuck" element(s) move to their new
position.

 

There's no stack trace to report and no test case that will work every
time, so I'm at a loss.

 

Any ideas on what causes this?

 

Michael Bishop

Reply via email to