Skip to content

Conversation

@BJvdA
Copy link

@BJvdA BJvdA commented Nov 1, 2022

Proposed solution

If the resizable component is centered, for example you have margin x auto, it resizes twice as fast, so the x ratio should be 2 instead of 1. While y ratio should stay 1. This implements the option to pass an object to resizeRatio of {x?:number; y?:number} so x and y axis can have a different resizeRatio.

Tradeoffs

Users can keep providing a number to resizeRatio if they don't want to use this

Testing Done

Wrap resizable in a container and give it margin-left: auto and margin-right: auto, see how the handle does not stick to the cursor while resizing. Add resizeRatio={{ x: 2 }} and see now the handle moves with the cursor.

@bokuweb
Copy link
Owner

bokuweb commented Nov 11, 2022

@BJvdA Thanks for your PR. Could you please add story and update README?

@byaman
Copy link

byaman commented Aug 22, 2023

Do you have any new information regarding the pull request? It's necessary for my project.

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.

3 participants