Fix right/bottom edge jump issue when adjust rect

Authored by guotao on Mar 26 2018, 4:05 AM.



right/bottom edge move unexpected when adjust left/top edge.
To fix this issue, just set x/y before width/height

Test Plan
  1. select a rect, make sure the right/bottom edge is beside moniter edge
  2. drag the topleft, top, top right up or drage top left, left, bottom left to left quickly, the bottom/ right edge move unexpected

Diff Detail

R166 Spectacle
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
guotao requested review of this revision.Mar 26 2018, 4:05 AM
guotao created this revision.
guotao updated this revision to Diff 30583.Mar 26 2018, 4:09 AM

Update diff

ngraham accepted this revision.Mar 26 2018, 1:21 PM
ngraham added a reviewer: Spectacle.

Thanks for the patch. Code looks sane, it fixes the described issue, and I could not cause any regressions after a lot of rectangular region selections on other screen edged and in the middle of the screen.

This revision is now accepted and ready to land.Mar 26 2018, 1:21 PM
rkflx accepted this revision.Mar 26 2018, 8:35 PM

Thanks! Having this in a separate patch is clearly less confusing, I now see what problem you were referring to… Patch LGTM (and you even used Arcanist, which makes for easier review and landing ;)

This revision was automatically updated to reflect the committed changes.