coords to grid for mouse