Hi Chandra & Tonny,

Tonny Kohar wrote:

or is there a way i can disable scripting on the svg document before doing the drap and drop and later enable scripting after the drop.

I am not sure if this work, but you can set the JSVGCanvas.setDocumentState() to ALWAYS_DYNAMIC, STATIC, DYNAMIC.

This will turn off scripting for then entire document permanently (and must be done before the document is associated with the canvas).

   What you could do is suspend the UpdateManager.  The only problem
is that this will turn off _all_ scripting in the SVG (including
probably your Java Scripting that is doing the DnD operation).  So
this probably isn't what you want really.

   The next suggestion would be to add a 'glass pane' to the SVG
document to capture all mouse events.  This can be done by
adding a very large rectangle as the last element in the document
(document.getRootElement().appendchild(glassPane)).  This is a very
good technique for just moving elements around the canvas as it
solves the pointer falling off the element problem at the same
time.

   The only problem with this solution is if you need to know
what elements are 'under' the pointer (which is likely to be
needed for a Drag and Drop operation).  So, the other possible
solution would be to add an event listener to the root SVG element
on the 'capture' phase.  Then you can call 'stopPropagation'
on the DOMEvent object and thus keep the event from reaching any other
event listeners.

   I hope one of these helps you!

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to