When elements are copyable, they can't be sorted in their origin container
Copying prevents original elements from being dragged. A copy gets created and that gets dragged instead
Whenever that happens, a cloned event is raised
Note that the clones get destroyed if they're not dropped into another container
You'll be dragging a copy, so when they're dropped into another container you'll see the duplication.
dragula([querySelector('left'), querySelector('right')],
copy: (Element el, Element source) => source == querySelector('left'),
accepts: (Element el, Element target, Element source, Element sibling) => target != querySelector('left')));
+Move me, but you can use the plus sign to drag me around.
+Note that handle element in the moves handler is just the original event target.
+This might also be useful if you want multiple children of an element to be able to trigger a drag event.
+You can also use the moves option to determine whether an element can be dragged at all from a container, drag handle or not.
There are a few similar mechanisms to determine whether an element can be dragged from a certain container (moves), whether an element can be dropped into a certain container at a certain position (accepts), and whether an element is able to originate a drag event (invalid).
Clicking on these elements triggers a regular click event you can listen to.
Try dragging or clicking on this element.
Note how you can click normally?
Drags don't trigger click events.
Clicks don't end up in a drag, either.
This is useful if you have elements that can be both clicked or dragged.