Hi Julie,
In your mousedown code you initialize the position and size of the
'zone' rectangle and place it under the mouse. When the mouseup comes
along, zone is the target and the circle never gets a click event.
In the 'zone' rect, put pointer-events="none"
<rect fill="none" stroke-width="10" id="zone" visibility="visible"
stroke="rgb(100,100,100)" x="0" y="0" width="0" height="0"
pointer-events="none"/>
I haven't checked your previous posts closely, but maybe this was
thwarting your earlier attempts at getting the click event.
Curiously, using ASV3, the first click always fires a mousemove. Any
clicks after that did not. To get around this, I changed your mousemove
code to check that the mouse had actually moved (also avoids zooming to
zero width/height selections).
else if (evt.type == "mousemove"){
if (click) {
xsvg2 = getTrueCoordX(evt.clientX);
ysvg2 = getTrueCoordY(evt.clientY);
w = Math.abs(xsvg2-xsvg);
h = Math.abs(ysvg2-ysvg);
zoom = (w > 0) && (h > 0);
node.setAttributeNS(null,'x',Math.min(xsvg,xsvg2).toString());
node.setAttributeNS(null,'y',Math.min(ysvg,ysvg2).toString());
node.setAttributeNS(null,'width',w.toString());
node.setAttributeNS(null,'height',h.toString());
}
}
Ken
------------------------------------
-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my
membership"
----Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/svg-developers/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/