Sortable icon indicating copy to clipboard operation
Sortable copied to clipboard

Add Drag In and Drag Out events

Open roy-mdr opened this issue 2 years ago • 6 comments

Leaved comments in this commit for code review before merge.

known isues:

  • DnD HTML5 API: If drag too fast to another browser UI element (ej. dev tools) the HTML5 DnD dragLeave event is not triggered (not an issue from this code) ... a workaround could be to force a fallback to get the element at pointer position when dragging back to the browser window.

This PR resolve #2075 #979 #460 #1468 #2159 #1269


Usage

Sortable.create(inboxEl, {
    group: 'inbox',

    onDragIn:  (e) => console.log("+++++ drag in Inbox"),
    onDragOut: (e) => console.log("----- drag out Inbox"),
    onDrop: (e) => console.log("Doped!") // Somewhere inside X,Y of this sortable. Even if no onEnd event.
});

roy-mdr avatar Sep 02 '22 19:09 roy-mdr

Svelte demo

REPL: https://svelte.dev/repl/98f5c00046754b13bd4aae4d362b20e2?version=3.50.0

roy-mdr avatar Sep 03 '22 17:09 roy-mdr

Nice!

lovelyelfpop avatar Nov 03 '22 08:11 lovelyelfpop

@roy-mdr Is it going to merge in to the main library? How long do we have to wait for it?

SyedMSawaid avatar Mar 26 '23 02:03 SyedMSawaid

@roy-mdr Is it going to merge in to the main library? How long do we have to wait for it?

Unfortunately its not my decision but the original developers :/ Hopefully soon!

roy-mdr avatar Mar 28 '23 21:03 roy-mdr

@owen-m1 Any idea on when it is going to merge?

P.S. If there are no core maintainers for this project right now, how about we recruit some? I would love to contribute to this library.

SyedMSawaid avatar May 01 '23 17:05 SyedMSawaid

@SyedMSawaid Yeah I'm happy to add you if you'd like to contribute, I don't have a lot of time anymore

owen-m1 avatar Jul 02 '23 23:07 owen-m1