Snapping a line to the Grid

Snapping a line to the Grid is impossible when the Selection End Type is the first option.
Sketch - Snap line to grid

We’ve got some improvements to make to the Line tool, for sure.

What’s happening here is that Lines are created by default on half pixels as you can see in the Inspector (both X/Y properties end in *,5), and as you drag the resize handles, you do so by full pixel amounts, as per the Pixel Fitting setting in Settings > Layers.

Two workarounds here for you in this case:

  1. Adjust both X properties of the Line to be on full pixels.
  2. Change the border ends to have a Projecting cap style, which is the rightmost option in the Ends control in the Borders panel. This doesn’t make the resize handles snap to the guide, but this 1px line will visually end at the guides.

Thank you for the workaround details, I have been using this for some time now :slight_smile:

It would be great if you could prioritize fixing existing bugs instead of building new features. Thank you.

If you hit enter when line is selected you can also use this option to move it more precisely.

Screenshot 2023-05-03 at 10.40.33