opensubscriber
   Find in this group all groups
 
Unknown more information…

b : batik-users@xmlgraphics.apache.org 4 September 2009 • 6:58PM -0400

Re: onClick event problem
by thomas.deweese

REPLY TO AUTHOR
 
REPLY TO GROUP




Hi Habib, Jonathan,

Habib <hobbbo@gmai...> 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.

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.