noya-app/noya

Dragging a layer when zoomed in should still snap to pixels

dabbott opened this issue · 5 comments

Dragging a layer when zoomed in should still snap to pixels

@milg15 I'm not totally sure what's involved with this, but do you want to investigate and try it?

@milg15 I'm not totally sure what's involved with this, but do you want to investigate and try it?

Yes! Do you have an example for this?

Ohh I understand. I think I have an idea on how to solve this
update: no, I'm not sure what you mean by this. I thought it was something else 😅

Here's an example. If I draw a rectangle when zoom is greater than 100%, the x/y/w/h should all still be integers. Right now the dimensions are decimals:

NoyaNeedsPixelSnap.mov

We should snap to integer values when:

  • drawing a layer
  • moving/dragging a layer
  • scaling a layer

I think just Rounding the numbers works.