dragula icon indicating copy to clipboard operation
dragula copied to clipboard

Smooth animation during element reordering.

Open roccomuso opened this issue 9 years ago • 19 comments

Is it already available? I'd like to have a smooth reordering animation on the other elements during the drag process.. Like in the Google Keep app.

roccomuso avatar Dec 30 '15 23:12 roccomuso

+1

alvarotrigo avatar Mar 12 '16 15:03 alvarotrigo

+1

runmael avatar Apr 27 '16 10:04 runmael

+1

sjahan avatar Jul 15 '16 17:07 sjahan

+1 👍🏼

ariona avatar Aug 05 '16 08:08 ariona

It seems odd to not have this feature. I'll look into how it could be done in the coming weeks.

maxbendick avatar Aug 14 '16 20:08 maxbendick

Does not belong in dragula. Dragula already appends a ghost element. It's your decision to add a smooth animation when it's added to the DOM and it heavily relies on your layout.

romainbessugesmeusy avatar Sep 01 '16 08:09 romainbessugesmeusy

Does not belong in dragula. Dragula already appends a ghost element. It's your decision to add a smooth animation when it's added to the DOM and it heavily relies on your layout.

Could you please provide a quick demo of a simple animation ?

As far as I can see, the ghost element is appended / moved to another position in the DOM making it impossible to animate through css3 transitions alone. Same with the other elements that will get moved when re-positioning the element. Unlike other libraries such as packery which maintain the elements in the exact same DOM position, dragula doesn't.

I guess this would need to involve some Javascript at least? A good example can be found in the sortable library. Which seems to follow the same DOM structure and changes.

Here's my failed attempt.

alvarotrigo avatar Sep 01 '16 10:09 alvarotrigo

+1

sp3 avatar Oct 15 '16 12:10 sp3

+1

ibrychgo avatar Oct 20 '16 03:10 ibrychgo

+1

marcushat avatar Oct 24 '16 09:10 marcushat

+1

shijistar avatar Oct 27 '16 15:10 shijistar

+1

ghost avatar Nov 08 '16 22:11 ghost

  • 1

kildareflare avatar Nov 13 '16 02:11 kildareflare

I add smooth animation in my fork , https://sindu12jun.github.io/dragula/ https://github.com/sindu12jun/dragula

sindu12jun avatar Dec 12 '16 02:12 sindu12jun

@alvarotrigo, thank your for pointing out Sortable! I just can't believe that I might go to implement the 4th grid/drag/sort/[you name it] solution now, but it looks great, too. I didn't see it before, but sometimes gems are the ones hiding the hardest.

mblackritter avatar Feb 05 '17 06:02 mblackritter

@zypo you're welcome ;)

alvarotrigo avatar Feb 05 '17 13:02 alvarotrigo

Why not reopen this PR and incorporate it? https://github.com/bevacqua/dragula/pull/450

shreshthmohan avatar Jan 24 '19 13:01 shreshthmohan

I add smooth animation in my fork , https://sindu12jun.github.io/dragula/ https://github.com/sindu12jun/dragula

Not really worked with the same API. I'm having issues with it and the issues page has been disabled. So I assume it is not maintained anymore.

alvarotrigo avatar Jan 28 '20 16:01 alvarotrigo

The pull requested in https://github.com/bevacqua/dragula/pull/450 works perfectly ;)

alvarotrigo avatar Jan 28 '20 16:01 alvarotrigo