ruler icon indicating copy to clipboard operation
ruler copied to clipboard

Contrain ruler movement to horizontal or vertical while Shift is held.

Open alexis-m opened this issue 6 years ago • 1 comments

There are a couple of details in this feature. First, if done naively, a user will experience sudden jumps between snapping to horizontal or vertical axis when they move the mouse close to the starting mouse position. Second, it is difficult the mouse exactly horizontally or vertically. This adds noise to the first problem of moving close to the starting position.

I did the following:

  • Don't constrain the movement at all in the beginning when the mouse is still very close to the starting position.
  • Once the mouse has moved far enough, remember the direction and start constraining window movement.

Doing this seems to avoid any unexpected behavior during movement close to the starting position. Users can always change the direction by releasing Shift, moving the window, and then pressing Shift again.

Closes #42

alexis-m avatar Jan 31 '19 17:01 alexis-m

I was busy, I'll look into PR soon. I'm still not sure about this feature...

andrijac avatar Feb 10 '19 10:02 andrijac