-
-
Notifications
You must be signed in to change notification settings - Fork 333
Feature request: Resize in both the dragged direction and its opposite? #740
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
It's possible and I have created it. But it depends on the containers inside which you are creating this draggable component. If you are using |
@sujoyduttajad great tip! Does resizing from the left edge/corners work properly for you though? For us, it instead does a weird hybrid move/grow when we set it to use |
You need to set the parameters accordingly, I mean for which direction you want the resize to occur. For ex- if you did |
Unfortunately we have all directions of resize enabled when we're seeing this issue. Dragging right: The box expands left and right, with the mid-point remaining fixed Dragging left: The box expands leftward, but the right edge also moves leftward, at maybe half the rate that the left edge does. This results in the mid-point of the box moving leftward. |
Try this will help you. Dont use onResizeStop to set the positions
onResize :
onDragStop :
|
Overview of the problem
I'm using react-rnd version 10.2.1
My browser is: Chrome 82
I am sure this issue is not a duplicate? Pretty certain, but maybe I missed it
Description
Feature request: When dragging in one direction, is it possible to have the box grow in that direction and its opposite? For example, if you drag the left edge, the box would grow on both the left and right sides simultaneously.
The text was updated successfully, but these errors were encountered: