An Ember component for implementing HTML5 Drag and Drop.
There are two parts to supporting Drag and Drop. The first is the dropzone. Which is implemented like so:
{{#sortable-dropzone dropped="changeState" identifier="todo" accepts="*"}}
{{/sortable-dropzone}}
It takes the following options:
droppedThis action is called once an item has been dropped into the containeridentifierThe destination in which is being dropped intoplaceholderA placeholder element which is inserted when hoveringacceptsFine-grain control on what can be dropped in the container. See here from more details
{{#sortable-element content=ticket.id type="ticket" origin="todo"}}
<div class="task-ticket">
<div class="ticket-title">
{{ticket.title}}
</div>
<span class="ticket-number">
#{{ticket.local_id}}
</span>
</div>
{{/sortable-element}}
It takes the following options:
contentThe identifier of the item being moved.typesortable-dropzone and sortable-elements can be nested if that is the case pass a type.originThe dropzone the item belongs to.