clauderic / react-sortable-hoc

A set of higher-order components to turn any list into an animated, accessible and touch-friendly sortable list✌️
https://clauderic.github.io/react-sortable-hoc/
MIT License
10.77k stars 978 forks source link

fix:Fix sortableContainer distance inaccurate #849

Open MingShun-Li opened 2 years ago

MingShun-Li commented 2 years ago

Fix the distance attribute. Change the offset sum of X and Y axes to the pixel value of a straight line

codesandbox-ci[bot] commented 2 years ago

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit be1ed3bcd81e5d63f2fed87bd541e229dc10d909:

Sandbox Source
react-sortable-hoc-starter Configuration
MingShun-Li commented 2 years ago

Using the distance attribute of the container, according to the description document and usage, it should be the linear pixel value of the offset position and the origin, rather than the sum of the offsets of the X and Y axes. I hope the author can see and merge this PR, otherwise the description of distance is ambiguous.

vaynevayne commented 1 year ago

Also encountered this problem, now this library, do not repair bug, nor allow others to pr tmd