Hi,
I want to sync the image size of both graphics and also I need the mouse position information as the following code does:
DynamicModule[{imx = 400, imy = Automatic, pos = 0},
{Graphics[{Circle[]}, Epilog -> Dynamic[pos = First[MousePosition[{"Graphics", Graphics}, {True, 0}]]; {}],
ImageSize -> Dynamic[{imx, imy}]],
Graphics[Disk[], ImageSize -> Dynamic[{imx, imy}]],
Dynamic[Print[1]; {imx, imy, pos}]}]
This code print 1 as long as the image size got updated.
My problem was, is there a way to avoid image size getting updated triggered by MousePosition?
For example: this code doesn't have MousePosition and {imx, imy} changes only when image got resized.
DynamicModule[{imx = 400, imy = Automatic},
{Graphics[{Circle[]}, ImageSize -> Dynamic[{imx, imy}]], Graphics[Disk[], ImageSize -> Dynamic[{imx, imy}]],
Dynamic[Print[1]; {imx, imy}]}]
I want the imx and imy got updated only when the image got resized AND also have mouse position information as the first piece of code. Any help?
Thanks