This Ember addon provides support for drag and drop using dragula
ember install @zestia/ember-dragula
https://zestia.github.io/ember-dragula
The full range of options that dragula accepts are supported, see: https://github.com/bevacqua/dragula#dragulacontainers-options
To supply options:
The full range of events that dragula emits are supported, see: https://github.com/bevacqua/dragula#drakeon-events. These can be accessed by prefixing the event name with "on":
The dragula instance is emitted via an onReady
action, and allows access to all functions and fields on drake
(https://github.com/bevacqua/dragula#api):
To simulate dragging and dropping, test helpers are provided:
import { simulateDragDrop } from '@zestia/ember-dragula/test-support/helpers/simulate-drag-drop';
Within a test:
const dragMe = find('.drag-me');
const dropHere = find('.drop-here');
await simulateDrag(dragMe);
await simulateDrop(dragMe, dropHere);
await simulateDragDrop(dragMe, dropHere);