I'm working on what is essentially a whiteboard-like drawing app. I'm using a JSVGComponent, adding elements to the DOM in response to mouse clicks. I also have a SVGUserAgentAdapter extension that launches a web browser when <svg:a/> links are clicked. Both link-clicking and drawing are left-mouse button events. The problem is that when my drawing code is enabled, the SVGUserAgentAdapter never seems to get the mouse clicks. Finally I realized that what's probably happening is that my drawing code is adding elements (lines) to the document, so when the canvas sees the mouse events, the <svg:a/> is no longer on top; my <line/> elements are. If I change my drawing code to add lines of width 0, the SVGUserAgentAdapter sees the events.
One solution would be to do the link handling myself, if I can determine when a MouseEvent occurs over a <svg:a/> element. So I first check to see if there's a link under the mouse, and if not, do my drawing as usual. So my question is the following: how can I associate a DOM element with a given MouseEvent? Or is there a better way to attack this?
Thanks.
-- George Armhold Rutgers University eLearning Grant, DCIS
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]