Fixes for edge snapping.

The snapping for edges was in not-quite-absolute coordinates. The code that draws the red lines needs to be updated though since it still expects not-quite absolute coordinates.