group as target for clicks [Archive] - XML Elves

group as target for clicks

tecture
07-06-2004, 06:45 AM
i want to use this constellation:

<g id="group01">
<rect id="element01" ... />
<rect id="element02" ... />
</g>

with evt.getTarget(); i'll get 'element01' or 'element02' anytime i'm cklicking on one or the another element. but i like to get 'group01'. is that possible and if you think yes - wich way?

Anonymous
07-06-2004, 09:41 AM
You can add event to group and
evt.target will be child clicked
evt.currentTarget will be the group

Michel

tecture
07-06-2004, 02:56 PM
thanks ;)...

 
Web mp2kmag.com
mapforums.com

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum