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

Not able to maintain aspect ratio of image when resize from corners like topleft, topright, bottomleft, bottomright #905

Open
imajayt opened this issue Mar 2, 2023 · 0 comments

Comments

@imajayt
Copy link

imajayt commented Mar 2, 2023

Overview of the problem

I'm using react-rnd version 10.3.5

My browser is: Chrome

I am sure this issue is not a duplicate.

Reproduced project

https://codesandbox.io/s/magical-hugle-7xn45s?file=/src/index.js

Description

When trying to scale box from corners like topleft, topright, bottomleft, bottomright, it should scale with actual aspect ratio of box but it is getting stretched OR changing the aspect ratio of element.

Expected behavior

When scaled from corners it should scale box OR image based on the actual aspect ratio of image/box.

Actual behavior

Currently, it is changing the aspect ratio of image/box when scaled from corners.

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

No branches or pull requests

1 participant