I added grid snapping based on the tile offset so that it perfectly matches up with the grid. Look in the Tile sprite and the Cursor sprite, I labeled my changes with comments. Hope this helped!