Hi Ted,
IIRC my ApacheCON 2003 presentation had something on this:
http://people.apache.org/~deweese/ac2003/
[EMAIL PROTECTED] wrote:
Would a better approach to this problem be to create a big rectangle (ie. a "glasspane") add it to the SVGDoc and register this element as an Event listener?
Are there any examples of how to create one of these programatically?
====================================================================================
I have a JSVGCanvas (with a DOM representaion) of an imported SVG file. This file basically contains a plain white grid with several rectangles
in
it. I need to detect if the user has clicked in a "whitespace" area (ie. not
in
a rectangle "Element").
I have a Event listener on each rectangle, so I can detect a "click"
within
the rectangle itself. Attempts to put an Event listener on the "whole document" like this have failed:
Element elt = theDocument.getDocumentElement(); EventTarget t = (EventTarget)elt; t.addEventListener("click", new WhiteSpaceClickAction(), false);
I can detect ALL mouse events on the JSVGCanvas itself using Mouse Listeners, (ie. MouseListener, MouseMotionListener) but this still doesn't help, since I can't tell if the X, Y coordinates are "in" a rectangle or not.
Is there a "standard" way to do this? Is there an API call to query if a coordinate is within an Element?
Thanks for any help. Ted
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
