code to fix the lack of snapping to line on mouse brush movement