xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathan wood <jonathanshaww...@gmail.com>
Subject Re: onClick event problem
Date Thu, 03 Sep 2009 21:02:24 GMT
Hi Habib,

  Just a shot in the dark, but maybe the text bbox is maskin the
others....try adding pointer-events="none" to the text node and see if your
events get bubbled as expected...

also see http://www.w3.org/TR/SVG/interact.html#PointerEventsProperty

If this is no help, just shout back to me or the list.  I'm new here also,
so you may get better remedies later!

jonathan


On Thu, Sep 3, 2009 at 4:03 PM, Habib <hobbbo@gmail.com> wrote:

> Hi all,
>
> i have an SVG file (generated by Graphviz) to which I want to script using
> Java in order to add some event handling. The file is practically a set of
> <g> elements which correspond to a text inside a box:
>
> <g id="node1" class="node">
>     <title>node1</title>
>     <polygon fill="none" stroke="black" points="343,-684 197,-684 197,-648
> 343,-648 343,-684"/>
>     <text text-anchor="middle" x="270" y="-661.9" font-family="Times
> Roman,serif" font-size="14.00">node1 label</text>
> </g>
>
> However, my problem is that I am adding event listener for an onClick
> action on either the <g> or the <polygon> element (by srcipting with java).
> In either way, the event is triggered only if I click on the text (i.e. when
> the mouse pointer changes to a cursor) and not when I click on the box. Am I
> missing something? Thank you.
>
> Habib
>
>

Mime
View raw message