ValentinH / react-easy-sort

A React component to sort items in lists or grids
https://ValentinH.github.io/react-easy-sort
MIT License
160 stars 25 forks source link

Adds offset to items when dragging #12

Closed guatedude2 closed 3 years ago

guatedude2 commented 3 years ago

This PR adds offset to items when dragging so dragging appears seamless. This helps mitigate the issue when dragging an item, the item would center to the cursor and causing bad UX.

N1VxZOoyPU

Related issues:

ValentinH commented 3 years ago

Thank you for bringing this cool improvement and also for the clean code!

ValentinH commented 3 years ago

This was published in v1.0.0. However, I had to revert it in v1.0.1. because I found a bug while integrating it on our website: it doesn't work if the container is not at the top-left of the window. You can see it on Storybook if you open the "docs" version.

Do you think you could have a look to have this fixed?

ValentinH commented 3 years ago

See : react-easy-sort-bug

guatedude2 commented 3 years ago

Ah ok I’ll resubmit with the fix

guatedude2 commented 3 years ago

Ok this PR should fix that https://github.com/ricardo-ch/react-easy-sort/pull/13