I have a problem using MousePosition
. I want to restrict the value returned by MousePosition
to a specific Graphics object. Consider the following example:
g1 = Graphics[{Green, Disk[]}];
g2 = Graphics[{Blue,Disk[]}];
{g1, g2, Dynamic[MousePosition["Graphics"]]}
I would like to have the mouse position updated only if the mouse is on the second (blue) disk and not on the first one (green). This seems to be an easy problem, but I can't figure out how it works in Mathematica.
Thanks for help!