Hi Habib, Jonathan,
Habib <[email protected]> wrote on 09/03/2009 04:03:37 PM:
> i have an SVG file (generated by Graphviz) to which I want to script
>
> <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>
Note that the polygon has 'fill="none"'.
> 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.
Actually the event will be triggered if you click on the box,
meaning the outline of the box. It won't be triggered over the
'fill' region, since there isn't any fill. Fortunately you can
use the 'pointer-events' property to make it sensitive even
when there isn't any fill:
pointer-events="all"
You might want to read up on pointer-events to see what
other values might be useful to you.