1.0.0 • Published 6 years ago

ag-drag-drop v1.0.0

Weekly downloads
9
License
-
Repository
-
Last release
6 years ago

##mini drag-drop for angular 6+ and RXJS ###install npm i ag-drag-drop ###Demo http://angular6-drag-drop.giapdien.info ###How to use

<div class="drop-content" gdsDrop (gdsDropStart)="startDrag($event)" (gdsDropDone)="doneDrag($event)">
  <div class="drag-item" gdsDrag>Drag item 1</div>
  <div class="drag-item" gdsDrag>Drag item 2</div>
  <div class="drag-item" gdsDrag>Drag item 3</div>
  <div class="drag-item" gdsDrag>Drag item 4</div>
</div>

####required directive gdsDrop, gdsDrag ####If used drag target

<div class="drag-item" gdsDrag>
<button type="button" gdsDragTarget>Drag me</button>
  Drag item 3
</div>

####Emit event

gdsDropStart: Activate the start click on item and start the drag task, return HTMLElement

gdsDropDone: Activate when dropping a item into a new location, return object {item1:HTMLElement, item2:HTMLElement}

gdsDropMove: Activate when dragging a item

1.0.0

6 years ago

0.1.0

6 years ago

0.0.1

6 years ago