DRAGULAR

Angular drag&drop based on dragula.

Live examples in docs

Browser support includes every sane browser and **IE7+**. _(Granted you polyfill the functional `Array` methods in ES5)_

Inspiration

I am working on huge angular project and I am using several drag&drop libraries in it, one for UI, one for lists, etc.. I want to use one full-featured drag&drop library for whole project. As I could not find any suitable, I decided to create one. I have choosen great library dragula by Nicolas Bevacqua as my starting point, make it more angular and started to put features in it! If you wish light-weight angular version of dragula, there is official angular version of dragula.

Actual version 4.2.3 is based on dragula 3.6.3 and tested with angular 1.5.5.

Differences of dragular (against dragula)

  • replaced dragula crossvent with angulars event binding
  • replaced dragula contra.emitter with $scope.$emit if scope provided in options (options.scope)
  • provided as service or directive dragular where options can be passed via atribute dragular
  • automatic direction if not provided in options, instead of default vertical
  • accepting arraylike objects as containers array (jQuery, jQlite collections etc..)
  • accepting custom classes via option.classes
  • namespaced containers groups available via option.nameSpace (containers in same nameSpace cooperate)
  • boundingBox (dragging element can me moved only in specific area)
  • lockX/Y (dragging element can me moved only in specific direction)
  • DOM can be synced with scope model
  • support css selectors to define containers
  • added syntax highlighter to example codes
  • etc..

Todo

  • improve docs

Features

  • provided as service and also as directive
  • Super easy to set up
  • No bloated dependencies
  • Figures out sort order on its own
  • A shadow where the item would be dropped offers visual feedback
  • Touch events!

For installation, usage and examples go to docs