You can use the lasso which I showed earlier at Re: Canvas group members syntax or use the "find" method with the "closest" option to find the closest item to that mouse point. addtag also employs closest(where it is explained).
You will find that it is an "art" to come up with a clever sub, to do what you want with tags. I often will suddenly realize a week later, that there is a more simple/clever way, than what I start out with. It usually involves using find( with some criteria), then looping thru all the items found, checking their tags, then adding or deleting tags to items, etc. For instance, you could have a bunch of colored geometric shapes( squares, circles,rects,etc), each colored differently. If they were tagged properly, you could click the mouse somewhere, find all 'red' ones within a certain distance, then filter out only the red circles.... then do something with them only. Be creative! Think ahead about systems where you dynamically add and remove tags constantly....you will have full control then.
In reply to Re^3: Canvas group members syntax
by zentara
in thread Canvas group members syntax
by merrymonk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |