Draw a step by step diagram to explain how the snapping works. Might help facilitate quicker understanding of the code From spap.grid.ts