This takes a little patience to reproduce, but I got a screenshot of it in version 9 on Mac OS X 10.7.5:
With a small Graphics
object, it occasionally happens that MousePosition
doesn't get updated when your mouse enters the graphic from the bottom.
Dynamic[MousePosition["Graphics"]]
Graphics[{Orange, Rectangle[{0, 0}, {1, 1}]}, ImageSize -> 60,
PlotRange -> {{0, 1}, {0, 1}}]
As the image shows, the mouse is clearly inside the orange square, but the line above shows None
instead of the mouse coordinates relative to the PlotRange
. If I leave the square toward the top and re-enter from the top, the mouse position starts following my movements. To see the effect of the frozen None
mouseposition, it seems I have to enter the rectangle from the bottom. I have to try this a couple of times - it doesn't happen every time.
Is there a way, perhaps by surrounding the Graphics
command in some other environment, to insure that the MousePosition
is recorded more reliably?
Edit
I've now reproduced it on Mathematica version 9 and 8.0.4, OS X 10.7.5 on two different computers.
Edit 2
Although I'm not 100% sure, I strongly believe that jVincent's observation is correct: to reproduce this, I have to set the zoom level of the notebook, or the Magnification setting in Advanced Preferences > Global Preferences > Notebook Options > Display Options
to something other than the default 100 %
(or 1
, respectively). In my case, the latter was set to 1.25
when I made the screen shot.