added code to offgrid to perform mouse click and mouse motion, still working on finding the nearest coordinate