Hey!
I feel there's room for improvement when grabbing items. Now it always sticks element at 0,0 to the cursor in modern browsers. See gif:

Wouldn't it be smoother if the item stays at the grabbed position like this:

I'm happy to supply a PR with this, just wanted to throw the suggestion out here before to discuss possible solutions.
As i see it, there's two ways of solving it:
-
Add a action similar to determineForeignPositionAction where the user implements their own method to calculate where to position the item.
-
Add an argument to drag-sort-list which allows setting predetermined positions. Something like auto|top left|bottom left|center center| etc... Very CSS like values, where auto positions it where grabbed.
I'd prefer alternative 1, but that's probably because of laziness. Maybe there are better options than those two.
Suggestions? Thoughts?
Hey!
I feel there's room for improvement when grabbing items. Now it always sticks element at 0,0 to the cursor in modern browsers. See gif:
Wouldn't it be smoother if the item stays at the grabbed position like this:

I'm happy to supply a PR with this, just wanted to throw the suggestion out here before to discuss possible solutions.
As i see it, there's two ways of solving it:
Add a
actionsimilar todetermineForeignPositionActionwhere the user implements their own method to calculate where to position the item.Add an argument to
drag-sort-listwhich allows setting predetermined positions. Something likeauto|top left|bottom left|center center|etc... Very CSS like values, whereautopositions it where grabbed.I'd prefer alternative 1, but that's probably because of laziness. Maybe there are better options than those two.
Suggestions? Thoughts?