Skip to content

Positioning of the dragged image  #27

@frysch

Description

@frysch

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:

drag-n-drop-jumpin

Wouldn't it be smoother if the item stays at the grabbed position like this:
drag-n-drop-smooth

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:

  1. Add a action similar to determineForeignPositionAction where the user implements their own method to calculate where to position the item.

  2. 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions