Given a 10 by 10 grid like the one below and the axis origin somewhere on the grid, I would like to be able to place the mouse pointer at the axes origin (0,0), then press and hold the mouse button and drag the axes origin to a new location. Once the mouse button is released i would like this new position to be the new axis origin (0,0).
Manipulate[
Graphics[Point[p], Axes -> True, AxesOrigin -> {0, 0},
PlotRange -> {{-5, 5}, {-5, 5}},
GridLines -> {Range[-5, 5, 1], Range[-5, 5, 1]}], {{p, {0, 0}},
Locator}]
Ending View
Edit: The code below almost works. See animation. But as you can see that as soon as the origin is moved the distance is scaled further and further away from the current mouse position. I would like it at the same position so i don't loose the locator off the screen or have to search for it. Also once its off... it only gets worse once the mouse is unchecked and rechecked again. this could all be fixed if i could get rid of the scaling somehow.
Manipulate[
Graphics[Point[p], Axes -> True, AxesOrigin -> {0, 0},
PlotRange -> {{-5 - p[[1]], 5 - p[[1]]}, {-5 - p[[2]], 5 - p[[2]]}},
GridLines -> {Range[-5, 5, 1], Range[-5, 5, 1]}], {{p, {0, 0}},
Locator}]