--- In [email protected], "Jeff Schiller" <[EMAIL PROTECTED]> wrote: > > This appears to be a simple problem, but sadly I haven't yet figured > out a solution. > > - contained within the bounding box of a rectangle is a circle > - only when the mouse enters the bounding box of the rectangle, I want > to alert some message > - only when the mouse leaves the bounding box of the rectangle, I want > to alert some message > - when a mouse clicks on the circle, I want to alert some message. >
Next iteration (that actually works most of the time): <svg xmlns="http://www.w3.org/2000/svg"> <rect id="outer" pointer-events="none" width="300" height="200" stroke-width="5" visibility="hidden" onmouseout="alert('mouseout'); document.getElementById('inner').setAttribute('pointer-events', 'all'); document.getElementById('outer').setAttribute('pointer-events', 'none')" /> <rect id="inner" x="1" y="1" width="298" height="198" fill="blue" onmouseover="alert('mouseover'); document.getElementById('inner').setAttribute('pointer-events', 'none'); document.getElementById('outer').setAttribute('pointer-events', 'stroke')" /> <circle cx="100" cy="100" r="25" fill="green" onclick="alert('click')" /> </svg> Notice all the extra baggage and the toggling of point-events attributes... Also, at least my testing on Firefox and Opera in Ubuntu, the mouseout events are not always captured if you move the mouse fast enough. As Doug mentioned on freenode's #svg irc, it sure would be nice to have something like mouseenter/mouseleave standardized. Is that a DOM Events thing or something within the purvey of SVG? ------------------------------------ ----- 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/

