Sortable icon indicating copy to clipboard operation
Sortable copied to clipboard

Clone function

Open SvenAlHamad opened this issue 12 years ago • 8 comments

I think it would be useful to have a clone functionality.

When I move an element from one list to another, that a copy of that element is inserted, while the original still remains in the source list.

I know that this is possible to achieve with the events, but maybe creating a flag to get that functionality would be more practical.

SvenAlHamad avatar Oct 04 '14 11:10 SvenAlHamad

+1 On this one.

Is there maybe an example floating around how to achieve this using the events?

st3phan avatar Oct 09 '14 10:10 st3phan

https://github.com/RubaXa/Sortable/issues/50 ?

RubaXa avatar Oct 09 '14 11:10 RubaXa

How to get it back to the original position of the list after calling appendChild()?

gonnarun avatar Oct 28 '14 11:10 gonnarun

Remember the position before sorting.

RubaXa avatar Oct 28 '14 11:10 RubaXa

@SvenAlHamad, @gonnarun, @st3phan, @dearfrankg:

Try dev-branch and group.pull: clone.

RubaXa avatar Nov 08 '14 19:11 RubaXa

Can I have some clarification on this?

I tried the dev branch, and the drag element is still removed from the original list, even when group.pull: "clone". Even the advanced example on the homepage does the same thing.

sntran avatar Nov 24 '14 05:11 sntran

@sntran Try again dev-branch.

RubaXa avatar Nov 24 '14 06:11 RubaXa

Perfect! Thank you @RubaXa.

sntran avatar Nov 24 '14 06:11 sntran