re-resizable icon indicating copy to clipboard operation
re-resizable copied to clipboard

Edge does not track cursor on centered elements

Open aMoniker opened this issue 6 years ago • 2 comments

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 avatar May 09 '18 20:05 aMoniker

@aMoniker Thanks for your report. I see. I'll do some investigation, thanks.

bokuweb avatar May 09 '18 23:05 bokuweb

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?

diegocerdan avatar Sep 11 '19 01:09 diegocerdan