It's not perfect, but maybe this will do? I compare movement in X direction to movement in Y direction, then lock movement to the axis that has seen the most change. Click top/bottom to move vertically, left/right to move horizontally.
DragAxisRestrict.capx (r97)