cloudhead / rx

👾 Modern and minimalist pixel editor
https://discord.gg/xHggPjfsS9
GNU General Public License v3.0
3.09k stars 109 forks source link

Deleting/cutting causes position of floated pixels to jump on first mouse motion #78

Open ssokolow opened 4 years ago

ssokolow commented 4 years ago

With rx 0.4.0, when I...

  1. Press v
  2. Draw a selection box from top-left to bottom-right (as is my habit)
  3. Press d to cut the selection

...as soon as I move my cursor, the selected block of pixels will jump so that the top-left pixel is under the cursor. This is a big inconvenience when I just want to move a block of pixels up/down/left/right a pixel or two relative to their original position because my habit of selecting from top-left to bottom-right invariably puts the cursor over the bottom-right pixel of the selection.

d should either grab the floated selection based on where the cursor was at the time d was pressed, relative to the selection or warp the pointer to the top-left corner of the floated selection.

cloudhead commented 4 years ago

Yeah this isn't ideal. You can also nudge the selection with the j/k/h/l keys, after you've cut, but moving the mouse will snap the selection to the cursor.

I think the ideal UX for me would be:

cloudhead commented 4 years ago

so that the top-left pixel is under the cursor.

This is odd though, you mean the cursor isn't centered in the selection when you move it?

ssokolow commented 4 years ago

I think the ideal UX for me would be:

I can see the rationale, but I prefer to use d to cut and then the mouse to visually position things.

For me, the ideal UX would simply be "the anchor point for the selection will be wherever the mouse was when d was pressed, so d followed by moving the mouse 4 pixels up is guaranteed to move the selection 4 pixels up from where it was before and have zero horizontal motion."

This is odd though, you mean the cursor isn't centered in the selection when you move it?

My mistake. I was tired and distracted and didn't notice that, when it was jumping the image out of alignment on pieces of little 8x8 sprites, it wasn't jumping it all the way.