bevacqua / angularjs-dragula

:ok_hand: Drag and drop so simple it hurts
https://bevacqua.github.io/angularjs-dragula
MIT License
509 stars 109 forks source link

Different options for containers in same bag #32

Closed donnes closed 8 years ago

donnes commented 9 years ago
HTML
<div class="col-sm-6" dragula='"widgets-elements"' style="border:1px solid purple; padding: 10px;">
  <div style="padding: 5px; border: 1px solid red;">Widget 01</div>
  <div style="padding: 5px; border: 1px solid red;">Widget 02</div>
  <div style="padding: 5px; border: 1px solid red;">Widget 03</div>
</div>
<div class="col-sm-6" dragula='"widgets-container"' style="border:1px solid #000; padding: 10px;">
  <div style="padding: 5px; border: 1px solid red;">Widget 01</div>
  <div style="padding: 5px; border: 1px solid red;">Widget 02</div>
  <div style="padding: 5px; border: 1px solid red;">Widget 03</div>
</div>
JS
dragulaService.options($rootScope, 'widgets-elements', {
  copy: true
});
dragulaService.options($rootScope, 'widgets-container', {
  removeOnSpill: true
});
luckylooke commented 8 years ago

What do you expect and what it actually does? Could you provide also working example (plunker, jsfiddle, ... ), thanks! :)

donnes commented 8 years ago

Sorry I can't create a plunker cause I don't know how create this effect.

Image example:

sem titulo-1

luckylooke commented 8 years ago

For now I think that it is not possible to have different options for containers in same bag. You may want to use this solution.

donnes commented 8 years ago

Ok, thanks for help Lucky. :D

huazi111 commented 7 years ago

it has changed?? i cant use http://luckylooke.github.io/dragular/#/docs/docsInstall document, and the drag-angular cant use