Re: MouseClick: Limiting polyline area to line only

Hello Doug,

first, thanks for your advise!
I'm quite sorry to abuse this list for my questions. Thougt it is for
every stuff around SVG.
I already signed in at svg-developers and still hoping to get further
help there too.

Concerning your solution: Surely, I searched in the specs for some
solution and also found the pointer-events-property. Also tried it in
the same way as you but it doesn't work ... unfortunately.
Now I'm thinking about replacing every polyline element with a several
line ones. But I dunno, seems I'm simply to stupid to get my functions
working with lines or there is a fatal mistake in the specs which I
can't imagine!
Maybe someone can point out, why the following isn't working. I hope I
can vanish then ;)

<style type="text/css"><![CDATA[.HMILine {fill: none; stroke:black;
stroke-width:1;stroke-dasharray:none ;stroke-dashoffset:none;
stroke-linecap:butt }
]]></style>
  <line x1="940" y1="1190" x2="1180" y2="1190" id="Line112"
class="HMILine" style="stroke-width: 3; stroke: rgb(255,0,0); cursor:
pointer" onclick="msgbox(evt)" pointer-events="stroke">
  </line>
  <script type="text/ecmascript"><![CDATA[
    function msgbox(evt)
    {
      var idlink = evt.target.id;
      var msg = "You clicked" + idlink + "\n";
      alert(msg);
    }
    ]]></script>

The line is red but cursor isn't changing, furthermore it's not reacting
on the click event! Same stuff on a polyline element works completely
fine. I'm really at a loss :(
Don't wonder about the style definition at the beginning. I just get
this SVG graphics as input.

Received on Tuesday, 30 October 2007 10:23:03 UTC