Hi,
I am trying to do a drag and drop of a legend polygon in my SVG document
using JAVA
and i tried to add an eventlistener to an existing element in my SVG
document and for some reason the element does not respond to my mouse
events. I use JSVGCanvas and Applet.
Can someone tell me what i am doing wrong? Here is my sample code
SVG Code:
<g id="legend" transform="translate(80, 70)" style="pointer-events: all">
<g id="frame">
<polygon id="filtered" points ="0,0 48,0 53,5 224,5 224,166, 218,172
93,172
87,178 0,178"
style="opacity: 0.7; fill: #ffffff; stroke:#000000; filter:
url(#dropShadow);" />
<g id="upperCubes" style="fill: #999999;" transform="translate(3,3)">
<use xlink:href="#square" />
<use xlink:href="#square" x="6" style="opacity: 0.85" />
</g>
<g id="lowerCubes" style="fill: #999999;" transform="translate(3,172)">
<use xlink:href="#square" style="opacity: 0.1" />
<use xlink:href="#square" x="6" style="opacity: 0.25" />
<use xlink:href="#square" x="12" style="opacity: 0.4" />
</g>
</g>
</g>
JAVA code:
target = (SVGOMGElement) svgRoot.getElementById("legend");
frame = (SVGOMGElement) svgRoot.getElementById("frame");
filtered = (SVGOMPolygonElement) svgRoot.getElementById("filtered");
frame.addEventListener("mousedown", newListener, false);
My problem is the frame never responds to my mouse down events.
Thanks,
Javid
A clever person solves a problem.
A wise person avoids it.
-- Einstein
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]