Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #279 - Fix resize bug on certain rotate degree #281

Merged
merged 1 commit into from
Feb 7, 2022

Conversation

kmanaseryan
Copy link
Contributor

Not sure why there was a if condition on rotate value being positive. That's why for clockwise rotation it didn't work. After removing it bug got fixed. Tested other use cases looks like removing that condition didn't break other stuff.

Related issue:
#279

@kmanaseryan
Copy link
Contributor Author

@viliusle please review

@viliusle
Copy link
Owner

viliusle commented Feb 1, 2022

Not sure why there was a if condition on rotate value being positive

If I remember correctly, resize handles on rotated layers required much more calculation so it was disabled. I will check it again.

That's why for clockwise rotation it didn't work.

Can you give more details how to reproduce it? I had no issues with rotation.

I will review this PR.

@viliusle
Copy link
Owner

viliusle commented Feb 1, 2022

I can not see any improvements on rotation (still waiting on your clarification), but resizing rotated object works really badly.

@kmanaseryan
Copy link
Contributor Author

@viliusle as it's mentioned in #279 the resize doesn't work when it's rotated at some degrees, e.g. if you rotate right just a little bit and try to resize it won't work. You can also check the screencast provided in the issue.

Maybe the PR title is a little confusing. The bug is related to resize which happens on specific degree of rotated layer. There is no improvements indeed, just bug fixing related to resize.

@kmanaseryan kmanaseryan changed the title Issue #279 - Fix rotate bug Issue #279 - Fix resize bug on certain rotate degree Feb 2, 2022
@viliusle
Copy link
Owner

viliusle commented Feb 2, 2022

Resize feature for rotated layers requires much more work, and because I could not find time and because you still can change width, height, X, Y on right sidebar, it was disabled. Your PR enable to resize layer, but it does not add that additional functionality, so user experience would be even worse.

@viliusle viliusle closed this Feb 2, 2022
@kmanaseryan
Copy link
Contributor Author

Resize feature for rotated layers requires much more work, and because I could not find time and because you still can change width, height, X, Y on right sidebar, it was disabled. Your PR enable to resize layer, but it does not add that additional functionality, so user experience would be even worse.

@viliusle I understood, but actually the current version also allows resize on rotate. To reproduce it, you can rotate counterclockwise direction it still let you to resize.

@viliusle
Copy link
Owner

viliusle commented Feb 3, 2022

Now I see, that it IS possible to resize rotated object in some cases, I will fix it. But still we should not enable this feature until resizing rotated layer would work perfectly.

Thank you for notice.

kmanaseryan added a commit to JordanMagnuson/miniPaint that referenced this pull request Feb 6, 2022
@JordanMagnuson
Copy link

@viliusle I have tested @kmanaseryan's PR, and resizing and rotating seems to work fine now with this fix. It is a big improvement over the current implementation (where you can only resize after rotating in counter-clockwise direction). I think this should be commited, as it does not break any current functionality, but only offers improvement. Additional improvements could be made later if desired. Just my two cents.

@viliusle viliusle reopened this Feb 7, 2022
@viliusle viliusle merged commit 7cc20aa into viliusle:master Feb 7, 2022
@JordanMagnuson
Copy link

Thanks for the merge. I can see where resizing rotated layers can be improved further, but I think the current functionality is not bad. Here is a brief video showing the current functionality: https://www.loom.com/share/8af5d40356e1402fab7d7f03ddd081ce

Basically, resizing rotated layers using the corner handles (to keep aspect ratio) seems to work fine. The side handles used to transform the rotated layer in one direction (vertically or horizontally) are not perfect, perhaps, but the effect they produce is generally not bad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants