-
Notifications
You must be signed in to change notification settings - Fork 368
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
resizing elements on left border causes random jumping #38
Comments
This does not happen when dragging an object on the right side, which is working fine: |
when |
This will be resolved once https://github.com/mzabriskie/react-draggable sees it's 2.1.3 release :) |
hey @aeneasr, when the div is floated right (the resizing handle bar is on the left) and you drag the handle to the left, does the div increase in the left or right side? Also, did you use css to shift the handlebar from the right side to the left side? |
For those who has same problem: |
I'm having the random jumping issue too on a div where the resize handle is on the right (and is the only one). I've also noticed that it only happens when I have the className="box" applied to the ResizableBox. Without that class there's no problems but I need it in order to use the CSS that hides the handles until the element is hovered over. Using the suggestion above about adding a draggableOpts={{offsetParent: document.body}} to the ResizableBox solved the random jumping troubles. THANKS @PovarovDenis UPDATE: I was wrong. This did not help with the random jumping that I see when I try to resize while having the class named "box" that toggles the handles. |
I have a resizable div which is
float: right
. The handler is on the left side. Everything works fine when the handler is on the right side but I'm having some troubles with the one on the right.The following gif shows two screens. One, where the resizable is floating left and one where it's floating right. The floating left example is included to show you that it generally works.
After some debugging and seeing that it works fine if I scale the inner element only, I believe that the issue is caused because the origin of the element wrapping resizeable (which is top left I guess?) changes:
In pseudocode, the react structure of the borken example is:
The react structure of the example without jumping is:
The cause for the jumping is that in
onResize(event, { size }) { console.log(size) }
,size.width
fires random widths, as seen in the console:So - how is it possible to resize an element to the right?
The text was updated successfully, but these errors were encountered: