Hi,

I need to dynamically add or remove an EventListener when the user
clicks on an element displayed on a JSVGCanvas.  I am trying to listen
to DOM mutations.  If I use this code prior to calling setDocument, the
listener works after the document is displayed:

        EventTarget t = (EventTarget)elt;
        t.addEventListener("DOMAttrModified", anchorListener, true);
        parent.appendChild(typegroup);

However, when I add it during the interactive selection process, after
the document is already displayed in the JSVGCanvas, it doesn't work:

    public void setSelectedAttributes(SVGElement elt){
        elt.setAttributeNS(null, "selectionstate","selected");
        EventTarget t = (EventTarget)elt;
        t.addEventListener("DOMAttrModified", DX.anchorListener, true);
    }

Of course, the canvas is set to ALWAYS_DYNAMIC.

I must be missing a fairly basic concept or command.  Can someone please
help?

Dan Slater


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

Reply via email to