You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-commits@xmlgraphics.apache.org by Apache Wiki <wi...@apache.org> on 2006/04/30 21:19:15 UTC

[Xmlgraphics-batik Wiki] Update of "EventHandling" by ArchieCobbs

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Xmlgraphics-batik Wiki" for change notification.

The following page has been changed by ArchieCobbs:
http://wiki.apache.org/xmlgraphics-batik/EventHandling

New page:
The SVG specification describes how events such as mouse events are handled
here: [http://www.w3.org/TR/SVG/interact.html#PointerEvents].

In summary, when a mouse event occurs over the graphical rendering of a
document, one element in the document is chosen as the recipient of the event.
How this event is chosen is described in the link above, but briefly it
is the "top most" (i.e., latest in the document) element whose rendering
appears under the mouse position. For elements that draw paths, it is
possible to configure the element to receive events over only the path,
or only the interior of the path, or both.

The event then takes a round trip journey from the top of the document
down successive child nodes to the chosen element (in the "capture" phase),
then returns via the same path in reverse back up to the top node (in the
"bubble" phase). Various properties (such as '''pointer-events''')
on the nodes visited can change whether the event propagation is intercepted.

In the case of '''<use>''' elements, for the purpose of event propagation,
the referenced subtree is cloned at the point of its reference. This means
that the ancestors of the '''<use>''' element are traversed, not the
ancestors of the target of the '''<use>''', even though the latter
nodes are the ones actually used for the rendering of the graphics.