re-resizable
re-resizable copied to clipboard
Edge does not track cursor on centered elements
Overview of the problem
I'm using re-resizable version [4.4.8]
My browser is: Chrome 66.0.3359.139 on OSX
This issue doesn't appear to be a duplicate.
Description
When resizing a centered element, the edge does not track the cursor.
Steps to Reproduce
See the nested storybook for a good example of this:
- Drag the bottom right corner of the outer element. It "sticks" to the cursor.
- Drag the bottom right corner of the inner element. The cursor overshoots the handle.
Expected behavior
The handle should "stick" to the cursor no matter how the element is being positioned.
Actual behavior
The cursor overshoots the handle on automatically centered elements (justify-content: center
in the storybook example, and the same in my own implementation).
@aMoniker Thanks for your report. I see. I'll do some investigation, thanks.
If direction of resize is left or right on a centered elements, delta should be doubled.
Here a video: https://youtube.com/watch?v=d3vYbpN6Bdw
Maybe adding a bool as prop to double side resizes?