diff --git a/CHANGELOG.md b/CHANGELOG.md index c0d74e16..039e4955 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # 4.5.0 Wind River - with "copy:'events'" option dragular clone element including event handlers binded on element (request #165) +- added helpers methods into drake for easier dynamic add/removal of containers of drake initialised earlier # 4.4.6 Ghost in the shell - isContainer docs augmentation diff --git a/README.md b/README.md index dc62af21..b71794de 100644 --- a/README.md +++ b/README.md @@ -429,6 +429,16 @@ If an element managed by `drake` is currently being dragged, this method will gr Removes all drag and drop events used by `dragularService` to manage drag and drop between the `containers`. If `.destroy` is called while an element is being dragged, the drag will be effectively cancelled. +### `drake.addContainers( containers )` *!!! Experimental !!!* + +Method to add containers dynamicaly into drake initialised earlier. + +### `drake.removeContainers( containers )` *!!! Experimental !!!* + +Method to remove containers dynamicaly from drake initialised earlier. + + + # License MIT diff --git a/docs/dist/examples.js b/docs/dist/examples.js index 2f9afbab..c24723f3 100644 --- a/docs/dist/examples.js +++ b/docs/dist/examples.js @@ -465,6 +465,8 @@ return /******/ (function(modules) { // webpackBootstrap containersCtx: shared.containersCtx, // all contexts to containers sanitizeContainersModel: depSanitize, sanitizeContainers: sanitizeContainers, + addContainers: addContainers, + removeContainers: removeContainers, isContainer: isContainer, start: manualStart, end: end, @@ -1406,12 +1408,12 @@ return /******/ (function(modules) { // webpackBootstrap release( {} ); } - function removeContainers( all ) { + function removeContainers( containers ) { $rootScope.$applyAsync( function applyDestroyed() { - var changes = _isArray( all ) ? all : makeArray( all ); - changes.forEach( function forEachContainer( container ) { + containers = _isArray( containers ) ? containers : makeArray( containers ); + containers.forEach( function forEachContainer( container ) { angular.forEach( o.nameSpace, function forEachNs( nameSpace ) { @@ -1419,11 +1421,32 @@ return /******/ (function(modules) { // webpackBootstrap index = shared.containers[ nameSpace ].indexOf( container ); shared.containers[ nameSpace ].splice( index, 1 ); shared.containersCtx[ nameSpace ].splice( index, 1 ); + + if ( -1 < (index = initialContainers.indexOf( container ))) + initialContainers.splice( index, 1 ); } ); } ); } ); } + function addContainers( containers ) { + + containers = _isArray( containers ) ? containers : makeArray( containers ); + containers.forEach( function forEachContainer( container, i ) { + + angular.forEach( o.nameSpace, function forEachNs( nameSpace ) { + + shared.containers[ nameSpace ].push( container ); + shared.containersCtx[ nameSpace ].push({ + o: o, + m: getContainersModel( o )[ i ], // can be undefined + fm: o.containersFilteredModel[ i ] // can be undefined + }); + initialContainers.push( container ); + } ); + } ); + } + function scrollContainer( e ) { if ( shared.target ) { if ( e.originalEvent ) { @@ -2967,10 +2990,10 @@ return /******/ (function(modules) { // webpackBootstrap /* 31 */ /***/ (function(module, exports) { - 'use strict'; module.exports = angular.module("templates", []).run(["$templateCache", function($templateCache) {$templateCache.put("exampleBasic/exampleBasic.html","
\n\n\n// JS\n controller(\'Basic\', [\'$element\', \'dragularService\', function TodoCtrl($element, dragularService) {\n dragularService(\'.containerVertical\');\n }])\n
\n\n// CSS\n.clickedClass {\n background-color: orange !important;\n}\n
\n\n<!-- HTML -->\n <div class=\'wrapper\' ng-controller="Basic">\n <div class=\'containerVertical\'>\n <div>Move me, but you can only drop me in one of these containers.</div>\n <div>If you try to drop me somewhere other than these containers, I\'ll just come back.</div>\n <div>Item 3.</div>\n <div>Item 6.</div>\n </div>\n <div class=\'containerVertical\'>\n <div>You can drop me in the left container, otherwise I\'ll stay here.</div>\n <div ng-click=\"clicked = !clicked\" ng-class=\"clicked && \'clickedClass\'\">Try to click me, dragular distinguish drag from click</div>\n <div>Item 5.</div>\n </div>\n</div>\n
\n
download dragular.js and dragular.css from dist folder
\nOR clone git
\n\ngit clone http://github.com/luckylooke/dragular.git\n
\nOR use npm
\n\n[sudo] npm install dragular\n
\nOR use bower
\n\nbower install dragular\n
\nAND include files into your project
\n\n<link href=\'styles/dragular.css\' rel=\'stylesheet\' type=\'text/css\' />\n<script src=\'scripts/dragular.js\'></script>\n
\nAND put dragularModule into dependency array
\n\nvar app = angular.module(\'myApp\', [\'dragularModule\', \'otherDependencies\']);\n
\nDONE :)
\n"); - $templateCache.put("exampleBoundingBox/exampleBoundingBox.html","\n \n dragularService([$element.children(), {\n boundingBox: $element\n });\n
\n
\n download dragular.js and dragular.css from dist folder
\nOR clone git
\n\ngit clone http://github.com/luckylooke/dragular.git\n
\nOR use npm
\n\n[sudo] npm install dragular\n
\nOR use bower
\n\nbower install dragular\n
\nAND include files into your project
\n\n<link href=\'styles/dragular.css\' rel=\'stylesheet\' type=\'text/css\' />\n<script src=\'scripts/dragular.js\'></script>\n
\nAND put dragularModule into dependency array
\n\nvar app = angular.module(\'myApp\', [\'dragularModule\', \'otherDependencies\']);\n
\nDONE :)
\n"); + $templateCache.put("exampleBasic/exampleBasic.html","\n\n\n// JS\n controller(\'Basic\', [\'$element\', \'dragularService\', function TodoCtrl($element, dragularService) {\n dragularService(\'.containerVertical\');\n }])\n
\n\n// CSS\n.clickedClass {\n background-color: orange !important;\n}\n
\n\n<!-- HTML -->\n <div class=\'wrapper\' ng-controller="Basic">\n <div class=\'containerVertical\'>\n <div>Move me, but you can only drop me in one of these containers.</div>\n <div>If you try to drop me somewhere other than these containers, I\'ll just come back.</div>\n <div>Item 3.</div>\n <div>Item 6.</div>\n </div>\n <div class=\'containerVertical\'>\n <div>You can drop me in the left container, otherwise I\'ll stay here.</div>\n <div ng-click=\"clicked = !clicked\" ng-class=\"clicked && \'clickedClass\'\">Try to click me, dragular distinguish drag from click</div>\n <div>Item 5.</div>\n </div>\n</div>\n
\n
Items1:\n\n
{{items1 | json}}
Items2:\n\n
{{items2 | json}}
\n\n\n// JS\n controller(\'BasicModel\', [\'$scope\', \'$element\', \'dragularService\', function TodoCtrl($scope, $element, dragularService) {\n $scope.items1 = [{\n content: \'Move me, but you can only drop me in one of these containers.\'\n }, {\n content: \'If you try to drop me somewhere other than these containers, I\\\'ll just come back.\'\n }, {\n content: \'Item 3\'\n }, {\n content: \'Item 4\'\n }];\n $scope.items2 = [{\n content: \'Item 5\'\n }, {\n content: \'Item 6\'\n }, {\n content: \'Item 7\'\n }, {\n content: \'Item 8\'\n }];\n var containers = $element.children().children();\n dragularService([containers[0],containers[1]],{\n containersModel: [$scope.items1, $scope.items2]\n });\n }])\n
\n\n<!-- HTML -->\n<div class=\'wrapper\' ng-controller="Basic">\n <div class=\'tableRow\'>\n <div class=\'containerVertical\'>\n <div ng-repeat="item in items1">{{item.content}}</div>\n </div>\n <div class=\'containerVertical\'>\n <div ng-repeat="item in items2">{{item.content}}</div>\n </div>\n </div>\n <div class="tableRow">\n <div class="container">\n <div>Items1:\n <br/>{{items1 | json}}</div>\n </div>\n <div class="container">\n <div>Items2:\n <br/>{{items2 | json}}</div>\n </div>\n </div>\n</div>\n
\n
\n \n dragularService([$element.children(), {\n boundingBox: $element\n });\n
\n
\n \n \n dragularService([$element.children()[0].children(), {\n boundingBox: $element.children()[0],\n lockX: true\n });\n
\n
\n \n \n dragularService([$element.children()[0].children(), {\n boundingBox: $element.children()[0],\n lockY: true\n });\n
\n
\n \n\n\n// JS\n controller(\'Copy\', [\'$element\', \'dragularService\', function TodoCtrl($element, dragularService) {\n dragularService($element.children(), {\n copy: true\n });\n }])\n
\n\n<!-- HTML -->\n<div class=\'wrapper\' ng-controller="Copy" ng-hide="globals.showModelExamples">\n <div id=\'left2\' class=\'containerVertical\'>\n <div>Move me, and make copy on drop.</div>\n <div>If you try to drop me somewhere other than these containers, I\'ll just come back.</div>\n </div>\n <div id=\'right2\' class=\'containerVertical\'>\n <div>You can drop me in the left container, otherwise I\'ll stay here.</div>\n </div>\n </div>\n
\n
\n\n\n// JS\n controller('Basic', ['$element', 'dragularService', function TodoCtrl($element, dragularService) {\n dragularService('.containerVertical');\n }])\n
\n\n// CSS\n.clickedClass {\n background-color: orange !important;\n}\n
\n\n<!-- HTML -->\n <div class='wrapper' ng-controller="Basic">\n <div class='containerVertical'>\n <div>Move me, but you can only drop me in one of these containers.</div>\n <div>If you try to drop me somewhere other than these containers, I'll just come back.</div>\n <div>Item 3.</div>\n <div>Item 6.</div>\n </div>\n <div class='containerVertical'>\n <div>You can drop me in the left container, otherwise I'll stay here.</div>\n <div ng-click=\"clicked = !clicked\" ng-class=\"clicked && 'clickedClass'\">Try to click me, dragular distinguish drag from click</div>\n <div>Item 5.</div>\n </div>\n</div>\n
\n
download dragular.js and dragular.css from dist folder
\nOR clone git
\n\ngit clone http://github.com/luckylooke/dragular.git\n
\nOR use npm
\n\n[sudo] npm install dragular\n
\nOR use bower
\n\nbower install dragular\n
\nAND include files into your project
\n\n<link href='styles/dragular.css' rel='stylesheet' type='text/css' />\n<script src='scripts/dragular.js'></script>\n
\nAND put dragularModule into dependency array
\n\nvar app = angular.module('myApp', ['dragularModule', 'otherDependencies']);\n
\nDONE :)
\n"),e.put("exampleBoundingBox/exampleBoundingBox.html","\n \n dragularService([$element.children(), {\n boundingBox: $element\n });\n
\n
\n Items1:\n\n
{{items1 | json}}
Items2:\n\n
{{items2 | json}}
\n\n\n// JS\n controller('BasicModel', ['$scope', '$element', 'dragularService', function TodoCtrl($scope, $element, dragularService) {\n $scope.items1 = [{\n content: 'Move me, but you can only drop me in one of these containers.'\n }, {\n content: 'If you try to drop me somewhere other than these containers, I\\'ll just come back.'\n }, {\n content: 'Item 3'\n }, {\n content: 'Item 4'\n }];\n $scope.items2 = [{\n content: 'Item 5'\n }, {\n content: 'Item 6'\n }, {\n content: 'Item 7'\n }, {\n content: 'Item 8'\n }];\n var containers = $element.children().children();\n dragularService([containers[0],containers[1]],{\n containersModel: [$scope.items1, $scope.items2]\n });\n }])\n
\n\n<!-- HTML -->\n<div class='wrapper' ng-controller="Basic">\n <div class='tableRow'>\n <div class='containerVertical'>\n <div ng-repeat="item in items1">{{item.content}}</div>\n </div>\n <div class='containerVertical'>\n <div ng-repeat="item in items2">{{item.content}}</div>\n </div>\n </div>\n <div class="tableRow">\n <div class="container">\n <div>Items1:\n <br/>{{items1 | json}}</div>\n </div>\n <div class="container">\n <div>Items2:\n <br/>{{items2 | json}}</div>\n </div>\n </div>\n</div>\n
\n
\n \n dragularService([$element.children()[0].children(), {\n boundingBox: $element.children()[0],\n lockX: true\n });\n
\n
\n \n \n dragularService([$element.children()[0].children(), {\n boundingBox: $element.children()[0],\n lockY: true\n });\n
\n
\n \n\n\n// JS\n controller('Copy', ['$element', 'dragularService', function TodoCtrl($element, dragularService) {\n dragularService($element.children(), {\n copy: true\n });\n }])\n
\n\n<!-- HTML -->\n<div class='wrapper' ng-controller="Copy" ng-hide="globals.showModelExamples">\n <div id='left2' class='containerVertical'>\n <div>Move me, and make copy on drop.</div>\n <div>If you try to drop me somewhere other than these containers, I'll just come back.</div>\n </div>\n <div id='right2' class='containerVertical'>\n <div>You can drop me in the left container, otherwise I'll stay here.</div>\n </div>\n </div>\n
\n
\n {{ items1 | json }}\n\n
\n {{ items2 | json }}\n\n
\n\n\n// JS\n controller('CopyModel', ['$scope', '$element', 'dragularService', function TodoCtrl($scope, $element, dragularService) {\n $scope.items1 = [{\n content: 'Move me, and make copy on drop.'\n }, {\n content: 'If you try to drop me somewhere other than these containers, I\\'ll just come back.'\n }, {\n content: 'Item 3'\n }, {\n content: 'Item 4'\n }];\n $scope.items2 = [{\n content: 'Item 5'\n }, {\n content: 'Item 6'\n }, {\n content: 'Item 7'\n }, {\n content: 'Item 8'\n }];\n var containers = $element.children().children();\n dragularService([containers[0],containers[1]],{\n containersModel: [$scope.items1, $scope.items2],\n copy: true\n });\n }])\n
\n\n<!-- HTML -->\n<div class='wrapper' ng-controller="CopyModel" ng-show="globals.showModelExamples">\n <div class='tableRow'>\n <div class='containerVertical'>\n <div ng-repeat="item in items1">{{item.content}}</div>\n </div>\n <div class='containerVertical'>\n <div ng-repeat="item in items2">{{item.content}}</div>\n </div>\n </div>\n <div class="tableRow">\n <div class="container">\n <div>Items1:\n <br/>{{items1 | json}}</div>\n </div>\n <div class="container">\n <div>Items2:\n <br/>{{items2 | json}}</div>\n </div>\n </div>\n </div>\n
\n
\n \n dragularService([document.getElementById(left), document.getElementById(right)], { classes: {\n mirror: 'custom-green-mirror'\n } });\n\n // Default classes are:\n option.classes = {\n mirror: 'gu-mirror',\n hide: 'gu-hide',\n unselectable: 'gu-unselectable',\n transit: 'gu-transit',\n overActive: 'gu-over-active',\n overAccepts: 'gu-over-accept',\n overDeclines: 'gu-over-decline'\n };\n
\n
\nItems1:\n\n
{{items1 | json}}
Items2:\n\n
{{items2 | json}}
\n\n\n// JS\n .controller('DifferentOptionsModel', ['$scope', '$element', 'dragularService', function TodoCtrl($scope, $element, dragularService) {\n $scope.items1 = [{\n content: 'Move me, but you can only drop me in one of these containers.'\n }, {\n content: 'If you try to drop me somewhere other than these containers, I\\'ll just come back.'\n }, {\n content: 'Item 3'\n }, {\n content: 'Item 4'\n }];\n $scope.items2 = [{\n content: 'Item 5'\n }, {\n content: 'Item 6'\n }, {\n content: 'Item 7'\n }, {\n content: 'Item 8'\n }];\n\n var containerLeft = document.querySelector('#containerLeft'),\n containerRight = document.querySelector('#containerRight');\n\n function accepts(el, target, source) {\n if (source === containerLeft || source === target) {\n return true;\n }\n }\n\n dragularService([containerLeft], {\n containersModel: [$scope.items1],\n copy: true,\n //move only from left to right \n accepts: accepts\n });\n\n dragularService([containerRight], {\n containersModel: [$scope.items2],\n removeOnSpill: true,\n //move only from left to right \n accepts: accepts\n });\n\n }])\n
\n\n<!-- HTML -->\n<div class='wrapper' ng-controller="DifferentOptionsModel">\n <div class='tableRow'>\n <div id="containerLeft" class='containerVertical'>\n <div ng-repeat="item in items1">{{item.content}}</div>\n </div>\n <div id="containerRight" class='containerVertical'>\n <div ng-repeat="item in items2">{{item.content}}</div>\n </div>\n </div>\n <div class="tableRow">\n <div class='containerVertical'>\n <pre>Items1:\n <br/>{{items1 | json}}</pre>\n </div>\n <div class='containerVertical'>\n <pre>Items2:\n <br/>{{items2 | json}}</pre>\n </div>\n </div>\n </div>\n
\n
\n\n\n// JS\n controller('Directive', ['$scope', 'dragularService', function TodoCtrl($scope) {\n $scope.dragularOptions = {\n classes: {\n mirror: 'custom-green-mirror'\n },\n nameSpace: 'common' // just connecting left and right container\n };\n }])\n
\n\n<!-- HTML -->\n<div class='wrapper' ng-controller="Directive">\n <div class='containerVertical' dragular="dragularOptions">\n <div>Move me, but you can only drop me in one of these containers.</div>\n <div>If you try to drop me somewhere other than these containers, I'll just come back.</div>\n <div>Item 3.</div>\n <div>Item 6.</div>\n </div>\n <div class='containerVertical' dragular='{"classes":{"mirror":"custom-green-mirror"},"nameSpace":"same"}'>\n <div>You can drop me in the left container, otherwise I'll stay here.</div>\n <div>Item 4.</div>\n <div>Item 5.</div>\n </div>\n </div>\n
\n
\n \n\n\n// JS\n controller('DirectiveModel', ['$scope', function TodoCtrl($scope) {\n $scope.items1 = [{\n content: 'Move me, and make copy on drop.'\n }, {\n content: 'If you try to drop me somewhere other than these containers, I\\'ll just come back.'\n }, {\n content: 'Item 3'\n }, {\n content: 'Item 4'\n }];\n $scope.items2 = [{\n content: 'Item 5'\n }, {\n content: 'Item 6'\n }, {\n content: 'Item 7'\n }, {\n content: 'Item 8'\n }];\n $scope.dragularOptions = {\n containersModel: $scope.items1,\n classes: {\n mirror: 'custom-green-mirror'\n },\n nameSpace: 'common' // just connecting left and right container\n };\n }])\n
\n\n<!-- HTML -->\n <div class='wrapper' ng-controller="DirectiveModel">\n <div class='containerVertical' dragular="dragularOptions">\n <div ng-repeat="item in items1">{{item.content}}</div>\n </div>\n <div class='containerVertical' dragular='{"containersModel":"items2","classes":{"mirror":"custom-green-mirror"},"nameSpace":"common"}'>\n <div ng-repeat="item in items2">{{item.content}}</div>\n </div>\n</div>\n
\n
You can interact with dragging element by litening to dragOver events. Usually you want to containers show wheather they accepts element or not, but you can use it anywhere. DragOver events are: dragenter, dragleave and dragrelease. On dragOver events dragularService reveals several useful properties.
\n\ndragularService.shared.item | \nitem beeing dragged (it is copy of item if copy is enabled via options) | \n
dragularService.shared.source | \nsource container item is dragged from | \n
dragularService.shared.sourceModel | \nsource container model representation if model was porvided | \n
dragularService.shared.initialIndex | \noriginal index of item, can be used to get item model from sourceModel | \n
dragularService.shared.extra | \ncontains accepting information (boolean) on dragenter, element drag is leaving to on dragleave and element behind the cursor on dragrelease | \n
Try to drag over the not-container too.
\n\n \n<!-- HTML -->\n <div class='wrapper' ng-controller="DragOverEvents">\n <div class='container width25'>\n <div>apples and oranges cannot be mixed</div>\n <div>apple 2</div>\n ...\n </div>\n <div class='container width25'>\n <div>orange 1</div>\n <div>orange 2</div>\n ...\n </div>\n <div class='container width25'>\n <div>apple 5</div>\n <div>apple 6</div>\n ...\n </div>\n <div class='container width25'>\n <div>orange 5</div>\n <div>orange 6</div>\n ...\n </div>\n </div>\n <div class="notContainer"> Test active class on NOT container.</div>\n
\n
\n\n \n \n // CSS\n \n.notContainer.gu-over {\n background-color: yellow;\n}\n\n.containerVertical.gu-over-accept {\n background-color: green;\n}\n\n.containerVertical.gu-over-decline {\n background-color: red;\n}\n
\n
\n\n \n \n // JS\n controller('DragOverEvents', ['$element', 'dragularService', function TodoCtrl($element, dragularService) {\n dragularService.cleanEnviroment();\n dragularService([$element.children()[0], $element.children()[2]], {\n nameSpace: 'apples'\n });\n dragularService([$element.children()[1], $element.children()[3]], {\n nameSpace: 'oranges'\n });\n\n // containers events handling\n function registerEvents(el) {\n el.on('dragularenter', function(e) {\n if (el[0] === e.target) { // filter bubbled\n el.addClass(dragularService.shared.extra ? 'gu-over-accept' : 'gu-over-decline');\n }\n });\n el.on('dragularleave dragularrelease', function(e) {\n if ((el[0] === e.target && // filter bubbled\n dragularService.shared.extra && // extra on dragleave contains element the drag is leaving to\n dragularService.shared.extra.parentElement !== e.target) // is that element child of this container?\n || e.type === 'dragularrelease') {\n el.removeClass('gu-over-accept');\n el.removeClass('gu-over-decline');\n }\n });\n }\n\n angular.forEach($element.children(), function forEachChild(el) {\n registerEvents(angular.element(el));\n });\n\n // notContainer events handling\n var notContainer = angular.element(document.getElementsByClassName('notContainer'));\n notContainer.on('dragularenter', function() {\n notContainer.addClass('gu-over');\n });\n notContainer.on('dragularleave dragularrelease', function() {\n notContainer.removeClass('gu-over');\n });\n }])\n
\n
\nEvents affecting more than on cotrollers are emitted on both scopes if provided.
\n\n \nvar EventsCtrl = function ($scope, $element, dragularService, $timeout) {\n \n var drake = dragularService($element.children(), {\n scope: $scope\n });\n $scope.$on('dragulardrag', function(e, el) {\n e.stopPropagation();\n el.className = el.className.replace(' ex-moved', '');\n });\n $scope.$on('dragulardrop', function(e, el) {\n e.stopPropagation();\n $timeout(function() {\n el.className += ' ex-moved';\n }, 0);\n });\n\n $scope.$on('dragularcloned', myFn('cloned in EventsCtrl'));\n $scope.$on('dragulardrag', myFn('drag in EventsCtrl'));\n $scope.$on('dragularcancel', myFn('cancel in EventsCtrl'));\n $scope.$on('dragulardrop', myFn('drop in EventsCtrl'));\n $scope.$on('dragularremove', myFn('remove in EventsCtrl'));\n $scope.$on('dragulardragend', myFn('dragend in EventsCtrl'));\n $scope.$on('dragularshadow', myFn('shadow in EventsCtrl'));\n\n function myFn(eventName) {\n return function() {\n console.log(eventName, arguments, drake);\n };\n }\n};\n\nvar Events2Ctrl = function ($scope, $element, dragularService, $timeout) {\n var drake = dragularService($element.children(), {\n scope: $scope\n });\n $scope.$on('dragulardrag', function(e, el) {\n e.stopPropagation();\n el.className = el.className.replace(' ex-moved', '');\n });\n $scope.$on('dragulardrop', function(e, el) {\n e.stopPropagation();\n $timeout(function() {\n el.className += ' ex-moved';\n }, 0);\n });\n\n $scope.$on('dragularcloned', myFn('cloned in Events2Ctrl'));\n $scope.$on('dragulardrag', myFn('drag in Events2Ctrl'));\n $scope.$on('dragularcancel', myFn('cancel in Events2Ctrl'));\n $scope.$on('dragulardrop', myFn('drop in Events2Ctrl'));\n $scope.$on('dragularremove', myFn('remove in Events2Ctrl'));\n $scope.$on('dragulardragend', myFn('dragend in Events2Ctrl'));\n $scope.$on('dragularshadow', myFn('shadow in Events2Ctrl'));\n\n function myFn(eventName) {\n return function() {\n console.log(eventName, arguments, drake);\n };\n }\n};\n
\n
\ndownload dragular.js and dragular.css from dist folder
\nOR clone git
\n\ngit clone http://github.com/luckylooke/dragular.git\n
\nOR use npm
\n\n[sudo] npm install dragular\n
\nOR use bower
\n\nbower install dragular\n
\nAND include files into your project
\n\n<link href='styles/dragular.css' rel='stylesheet' type='text/css' />\n<script src='scripts/dragular.js'></script>\n
\nAND put dragularModule into dependency array
\n\nvar app = angular.module('myApp', ['dragularModule', 'otherDependencies']);\n
\nDONE :)
\n"),e.put("exampleBasic/exampleBasic.html","\n\n\n// JS\n controller('Basic', ['$element', 'dragularService', function TodoCtrl($element, dragularService) {\n dragularService('.containerVertical');\n }])\n
\n\n// CSS\n.clickedClass {\n background-color: orange !important;\n}\n
\n\n<!-- HTML -->\n <div class='wrapper' ng-controller="Basic">\n <div class='containerVertical'>\n <div>Move me, but you can only drop me in one of these containers.</div>\n <div>If you try to drop me somewhere other than these containers, I'll just come back.</div>\n <div>Item 3.</div>\n <div>Item 6.</div>\n </div>\n <div class='containerVertical'>\n <div>You can drop me in the left container, otherwise I'll stay here.</div>\n <div ng-click=\"clicked = !clicked\" ng-class=\"clicked && 'clickedClass'\">Try to click me, dragular distinguish drag from click</div>\n <div>Item 5.</div>\n </div>\n</div>\n
\n
Items1:\n\n
{{items1 | json}}
Items2:\n\n
{{items2 | json}}
\n\n\n// JS\n controller('BasicModel', ['$scope', '$element', 'dragularService', function TodoCtrl($scope, $element, dragularService) {\n $scope.items1 = [{\n content: 'Move me, but you can only drop me in one of these containers.'\n }, {\n content: 'If you try to drop me somewhere other than these containers, I\\'ll just come back.'\n }, {\n content: 'Item 3'\n }, {\n content: 'Item 4'\n }];\n $scope.items2 = [{\n content: 'Item 5'\n }, {\n content: 'Item 6'\n }, {\n content: 'Item 7'\n }, {\n content: 'Item 8'\n }];\n var containers = $element.children().children();\n dragularService([containers[0],containers[1]],{\n containersModel: [$scope.items1, $scope.items2]\n });\n }])\n
\n\n<!-- HTML -->\n<div class='wrapper' ng-controller="Basic">\n <div class='tableRow'>\n <div class='containerVertical'>\n <div ng-repeat="item in items1">{{item.content}}</div>\n </div>\n <div class='containerVertical'>\n <div ng-repeat="item in items2">{{item.content}}</div>\n </div>\n </div>\n <div class="tableRow">\n <div class="container">\n <div>Items1:\n <br/>{{items1 | json}}</div>\n </div>\n <div class="container">\n <div>Items2:\n <br/>{{items2 | json}}</div>\n </div>\n </div>\n</div>\n
\n
\n \n dragularService([$element.children(), {\n boundingBox: $element\n });\n
\n
\n \n \n dragularService([$element.children()[0].children(), {\n boundingBox: $element.children()[0],\n lockX: true\n });\n
\n
\n \n \n dragularService([$element.children()[0].children(), {\n boundingBox: $element.children()[0],\n lockY: true\n });\n
\n
\n \n\n\n// JS\n controller('Copy', ['$element', 'dragularService', function TodoCtrl($element, dragularService) {\n dragularService($element.children(), {\n copy: true\n });\n }])\n
\n\n<!-- HTML -->\n<div class='wrapper' ng-controller="Copy" ng-hide="globals.showModelExamples">\n <div id='left2' class='containerVertical'>\n <div>Move me, and make copy on drop.</div>\n <div>If you try to drop me somewhere other than these containers, I'll just come back.</div>\n </div>\n <div id='right2' class='containerVertical'>\n <div>You can drop me in the left container, otherwise I'll stay here.</div>\n </div>\n </div>\n
\n
\n {{ items1 | json }}\n\n
\n {{ items2 | json }}\n\n
\n\n\n// JS\n controller('CopyModel', ['$scope', '$element', 'dragularService', function TodoCtrl($scope, $element, dragularService) {\n $scope.items1 = [{\n content: 'Move me, and make copy on drop.'\n }, {\n content: 'If you try to drop me somewhere other than these containers, I\\'ll just come back.'\n }, {\n content: 'Item 3'\n }, {\n content: 'Item 4'\n }];\n $scope.items2 = [{\n content: 'Item 5'\n }, {\n content: 'Item 6'\n }, {\n content: 'Item 7'\n }, {\n content: 'Item 8'\n }];\n var containers = $element.children().children();\n dragularService([containers[0],containers[1]],{\n containersModel: [$scope.items1, $scope.items2],\n copy: true\n });\n }])\n
\n\n<!-- HTML -->\n<div class='wrapper' ng-controller="CopyModel" ng-show="globals.showModelExamples">\n <div class='tableRow'>\n <div class='containerVertical'>\n <div ng-repeat="item in items1">{{item.content}}</div>\n </div>\n <div class='containerVertical'>\n <div ng-repeat="item in items2">{{item.content}}</div>\n </div>\n </div>\n <div class="tableRow">\n <div class="container">\n <div>Items1:\n <br/>{{items1 | json}}</div>\n </div>\n <div class="container">\n <div>Items2:\n <br/>{{items2 | json}}</div>\n </div>\n </div>\n </div>\n
\n
\n \n dragularService([document.getElementById(left), document.getElementById(right)], { classes: {\n mirror: 'custom-green-mirror'\n } });\n\n // Default classes are:\n option.classes = {\n mirror: 'gu-mirror',\n hide: 'gu-hide',\n unselectable: 'gu-unselectable',\n transit: 'gu-transit',\n overActive: 'gu-over-active',\n overAccepts: 'gu-over-accept',\n overDeclines: 'gu-over-decline'\n };\n
\n
\nItems1:\n\n
{{items1 | json}}
Items2:\n\n
{{items2 | json}}
\n\n\n// JS\n .controller('DifferentOptionsModel', ['$scope', '$element', 'dragularService', function TodoCtrl($scope, $element, dragularService) {\n $scope.items1 = [{\n content: 'Move me, but you can only drop me in one of these containers.'\n }, {\n content: 'If you try to drop me somewhere other than these containers, I\\'ll just come back.'\n }, {\n content: 'Item 3'\n }, {\n content: 'Item 4'\n }];\n $scope.items2 = [{\n content: 'Item 5'\n }, {\n content: 'Item 6'\n }, {\n content: 'Item 7'\n }, {\n content: 'Item 8'\n }];\n\n var containerLeft = document.querySelector('#containerLeft'),\n containerRight = document.querySelector('#containerRight');\n\n function accepts(el, target, source) {\n if (source === containerLeft || source === target) {\n return true;\n }\n }\n\n dragularService([containerLeft], {\n containersModel: [$scope.items1],\n copy: true,\n //move only from left to right \n accepts: accepts\n });\n\n dragularService([containerRight], {\n containersModel: [$scope.items2],\n removeOnSpill: true,\n //move only from left to right \n accepts: accepts\n });\n\n }])\n
\n\n<!-- HTML -->\n<div class='wrapper' ng-controller="DifferentOptionsModel">\n <div class='tableRow'>\n <div id="containerLeft" class='containerVertical'>\n <div ng-repeat="item in items1">{{item.content}}</div>\n </div>\n <div id="containerRight" class='containerVertical'>\n <div ng-repeat="item in items2">{{item.content}}</div>\n </div>\n </div>\n <div class="tableRow">\n <div class='containerVertical'>\n <pre>Items1:\n <br/>{{items1 | json}}</pre>\n </div>\n <div class='containerVertical'>\n <pre>Items2:\n <br/>{{items2 | json}}</pre>\n </div>\n </div>\n </div>\n
\n
\n\n\n// JS\n controller('Directive', ['$scope', 'dragularService', function TodoCtrl($scope) {\n $scope.dragularOptions = {\n classes: {\n mirror: 'custom-green-mirror'\n },\n nameSpace: 'common' // just connecting left and right container\n };\n }])\n
\n\n<!-- HTML -->\n<div class='wrapper' ng-controller="Directive">\n <div class='containerVertical' dragular="dragularOptions">\n <div>Move me, but you can only drop me in one of these containers.</div>\n <div>If you try to drop me somewhere other than these containers, I'll just come back.</div>\n <div>Item 3.</div>\n <div>Item 6.</div>\n </div>\n <div class='containerVertical' dragular='{"classes":{"mirror":"custom-green-mirror"},"nameSpace":"same"}'>\n <div>You can drop me in the left container, otherwise I'll stay here.</div>\n <div>Item 4.</div>\n <div>Item 5.</div>\n </div>\n </div>\n
\n
\n \n\n\n// JS\n controller('DirectiveModel', ['$scope', function TodoCtrl($scope) {\n $scope.items1 = [{\n content: 'Move me, and make copy on drop.'\n }, {\n content: 'If you try to drop me somewhere other than these containers, I\\'ll just come back.'\n }, {\n content: 'Item 3'\n }, {\n content: 'Item 4'\n }];\n $scope.items2 = [{\n content: 'Item 5'\n }, {\n content: 'Item 6'\n }, {\n content: 'Item 7'\n }, {\n content: 'Item 8'\n }];\n $scope.dragularOptions = {\n containersModel: $scope.items1,\n classes: {\n mirror: 'custom-green-mirror'\n },\n nameSpace: 'common' // just connecting left and right container\n };\n }])\n
\n\n<!-- HTML -->\n <div class='wrapper' ng-controller="DirectiveModel">\n <div class='containerVertical' dragular="dragularOptions">\n <div ng-repeat="item in items1">{{item.content}}</div>\n </div>\n <div class='containerVertical' dragular='{"containersModel":"items2","classes":{"mirror":"custom-green-mirror"},"nameSpace":"common"}'>\n <div ng-repeat="item in items2">{{item.content}}</div>\n </div>\n</div>\n
\n
You can interact with dragging element by litening to dragOver events. Usually you want to containers show wheather they accepts element or not, but you can use it anywhere. DragOver events are: dragenter, dragleave and dragrelease. On dragOver events dragularService reveals several useful properties.
\n\ndragularService.shared.item | \nitem beeing dragged (it is copy of item if copy is enabled via options) | \n
dragularService.shared.source | \nsource container item is dragged from | \n
dragularService.shared.sourceModel | \nsource container model representation if model was porvided | \n
dragularService.shared.initialIndex | \noriginal index of item, can be used to get item model from sourceModel | \n
dragularService.shared.extra | \ncontains accepting information (boolean) on dragenter, element drag is leaving to on dragleave and element behind the cursor on dragrelease | \n
Try to drag over the not-container too.
\n\n \n<!-- HTML -->\n <div class='wrapper' ng-controller="DragOverEvents">\n <div class='container width25'>\n <div>apples and oranges cannot be mixed</div>\n <div>apple 2</div>\n ...\n </div>\n <div class='container width25'>\n <div>orange 1</div>\n <div>orange 2</div>\n ...\n </div>\n <div class='container width25'>\n <div>apple 5</div>\n <div>apple 6</div>\n ...\n </div>\n <div class='container width25'>\n <div>orange 5</div>\n <div>orange 6</div>\n ...\n </div>\n </div>\n <div class="notContainer"> Test active class on NOT container.</div>\n
\n
\n\n \n \n // CSS\n \n.notContainer.gu-over {\n background-color: yellow;\n}\n\n.containerVertical.gu-over-accept {\n background-color: green;\n}\n\n.containerVertical.gu-over-decline {\n background-color: red;\n}\n
\n
\n\n \n \n // JS\n controller('DragOverEvents', ['$element', 'dragularService', function TodoCtrl($element, dragularService) {\n dragularService.cleanEnviroment();\n dragularService([$element.children()[0], $element.children()[2]], {\n nameSpace: 'apples'\n });\n dragularService([$element.children()[1], $element.children()[3]], {\n nameSpace: 'oranges'\n });\n\n // containers events handling\n function registerEvents(el) {\n el.on('dragularenter', function(e) {\n if (el[0] === e.target) { // filter bubbled\n el.addClass(dragularService.shared.extra ? 'gu-over-accept' : 'gu-over-decline');\n }\n });\n el.on('dragularleave dragularrelease', function(e) {\n if ((el[0] === e.target && // filter bubbled\n dragularService.shared.extra && // extra on dragleave contains element the drag is leaving to\n dragularService.shared.extra.parentElement !== e.target) // is that element child of this container?\n || e.type === 'dragularrelease') {\n el.removeClass('gu-over-accept');\n el.removeClass('gu-over-decline');\n }\n });\n }\n\n angular.forEach($element.children(), function forEachChild(el) {\n registerEvents(angular.element(el));\n });\n\n // notContainer events handling\n var notContainer = angular.element(document.getElementsByClassName('notContainer'));\n notContainer.on('dragularenter', function() {\n notContainer.addClass('gu-over');\n });\n notContainer.on('dragularleave dragularrelease', function() {\n notContainer.removeClass('gu-over');\n });\n }])\n
\n
\nEvents affecting more than on cotrollers are emitted on both scopes if provided.
\n\n \nvar EventsCtrl = function ($scope, $element, dragularService, $timeout) {\n \n var drake = dragularService($element.children(), {\n scope: $scope\n });\n $scope.$on('dragulardrag', function(e, el) {\n e.stopPropagation();\n el.className = el.className.replace(' ex-moved', '');\n });\n $scope.$on('dragulardrop', function(e, el) {\n e.stopPropagation();\n $timeout(function() {\n el.className += ' ex-moved';\n }, 0);\n });\n\n $scope.$on('dragularcloned', myFn('cloned in EventsCtrl'));\n $scope.$on('dragulardrag', myFn('drag in EventsCtrl'));\n $scope.$on('dragularcancel', myFn('cancel in EventsCtrl'));\n $scope.$on('dragulardrop', myFn('drop in EventsCtrl'));\n $scope.$on('dragularremove', myFn('remove in EventsCtrl'));\n $scope.$on('dragulardragend', myFn('dragend in EventsCtrl'));\n $scope.$on('dragularshadow', myFn('shadow in EventsCtrl'));\n\n function myFn(eventName) {\n return function() {\n console.log(eventName, arguments, drake);\n };\n }\n};\n\nvar Events2Ctrl = function ($scope, $element, dragularService, $timeout) {\n var drake = dragularService($element.children(), {\n scope: $scope\n });\n $scope.$on('dragulardrag', function(e, el) {\n e.stopPropagation();\n el.className = el.className.replace(' ex-moved', '');\n });\n $scope.$on('dragulardrop', function(e, el) {\n e.stopPropagation();\n $timeout(function() {\n el.className += ' ex-moved';\n }, 0);\n });\n\n $scope.$on('dragularcloned', myFn('cloned in Events2Ctrl'));\n $scope.$on('dragulardrag', myFn('drag in Events2Ctrl'));\n $scope.$on('dragularcancel', myFn('cancel in Events2Ctrl'));\n $scope.$on('dragulardrop', myFn('drop in Events2Ctrl'));\n $scope.$on('dragularremove', myFn('remove in Events2Ctrl'));\n $scope.$on('dragulardragend', myFn('dragend in Events2Ctrl'));\n $scope.$on('dragularshadow', myFn('shadow in Events2Ctrl'));\n\n function myFn(eventName) {\n return function() {\n console.log(eventName, arguments, drake);\n };\n }\n};\n
\n
\n\n \n dragularService([document.getElementById(left), document.getElementById(right)], {\n moves: function (el, container, handle) {\n return handle.className === 'handle';\n }\n });\n
\n
\nItems1:\n\n
{{items1 | json}}
Cart:\n\n
{{cartModel | json}}
\n\n\n// JS\n .controller('IsContainerModel', ['$scope', '$element', 'dragularService', function TodoCtrl($scope, $element, dragularService) {\n $scope.items1 = [{\n content: 'Move me, but you can only drop me in one of these containers.'\n }, {\n content: 'If you try to drop me somewhere other than these containers, I\\'ll just come back.'\n }, {\n content: 'Item 3'\n }, {\n content: 'Item 4'\n }];\n $scope.cartModel = [];\n\n var containerLeft = document.querySelector('#containerLeft');\n\n dragularService.cleanEnviroment();\n dragularService([containerLeft], {\n containersModel: [$scope.items1],\n copy: true,\n isContainer: function isContainer (el) {\n return el.id === 'cart';\n },\n isContainerModel: function getModel (){\n return $scope.cartModel;\n }\n });\n\n $scope.removeItem = function removeItem() {\n var index = $scope.cartModel.indexOf(this.item);\n $scope.cartModel.splice(index, 1);\n };\n\n }])\n
\n\n<!-- HTML -->\n <div class='wrapper' ng-controller="IsContainerModel">\n <div class='tableRow'>\n <div id="containerLeft" class='containerVertical'>\n <div ng-repeat="item in items1">{{item.content}}</div>\n </div>\n <div id="cart" class='containerVertical'>\n <div class='cursorDefault' ng-repeat="item in cartModel">{{item.content}}\n <button class='cursorDefault' ng-click="removeItem()">x</button></div>\n </div>\n </div>\n <div class="tableRow">\n <div class='containerVertical'>\n <pre>Items1:\n <br/>{{items1 | json}}</pre>\n </div>\n <div class='containerVertical'>\n <pre>Cart:\n <br/>{{cartModel | json}}</pre>\n </div>\n </div>\n </div>\n
\n
\n \ndragularService([$element.children()[0], $element.children()[2]], {\n nameSpace: 'apples'\n});\ndragularService($element.children()[1], {\n nameSpace: 'oranges'\n});\ndragularService($element.children()[3], { // mixed\n nameSpace: ['oranges', 'apples']\n});\n
\n
\n \n \n // HTML\n\n <div ng-controller="Example15">\n <div ng-repeat="item in items" class='exampleRow'>\n <div class="row-handle">Row {{$index}}</div>\n <div ng-repeat="item in item.items" class="exampleCell">{{item.content}}</div>\n </div>\n </div>\n
\n
\n \n \n // CSS\n\n .exampleRow {\n display: flex;\n flex-direction: row;\n }\n\n .exampleCell {\n flex-grow: 1;\n }\n\n .exampleRow,\n .exampleCell {\n margin: 10px;\n padding: 10px;\n background-color: rgba(0, 0, 0, 0.2);\n cursor: move;\n cursor: grab;\n cursor: -moz-grab;\n cursor: -webkit-grab;\n }\n
\n
\n \n \n // JS\n\n .controller('NestedNgRepeat', ['$timeout', '$scope', '$element', 'dragularService', function NestedNgRepeatCtrl($timeout, $scope, $element, dragularService) {\n $timeout(function() { // timeount due to ngRepeat to be ready\n dragularService($element, {\n nameSpace: 'rows',\n moves: function rowOnly (el, container, handle) {\n return handle.classList.contains('row-handle');\n }\n });\n dragularService($element.children(), {\n nameSpace: 'cells',\n moves: function excludeHandle (el, container, handle) {\n return !handle.classList.contains('row-handle');\n }\n });\n }, 0);\n $scope.items = [{\n items: [{\n content: 'Item a1'\n }, {\n content: 'Item a2'\n }, {\n content: 'Item a3'\n }, {\n content: 'Item a4'\n }]\n }, {\n items: [{\n content: 'Item b1'\n }, {\n content: 'Item b2'\n }, {\n content: 'Item b3'\n }, {\n content: 'Item b4'\n }]\n }, {\n items: [{\n content: 'Item c1'\n }, {\n content: 'Item c2'\n }, {\n content: 'Item c3'\n }, {\n content: 'Item c4'\n }]\n }];\n }])\n
\n
\n\n\nItems:\n\n
{{items | json}}
\n \n<!-- HTML -->\n<div ng-controller="NestedNgRepeatWithModel">\n <div class='containerVertical'>\n <div ng-repeat="item in items" class='exampleRow'>\n <div class="row-handle">Row {{::$index}}</div>\n <div class="exampleRow exampleCell containerNested">\n <div ng-repeat="item in item.items" class="exampleCell">{{item.content}}</div>\n </div>\n </div>\n </div>\n</div>\n
\n
\n \n \n // CSS\n\n .exampleRow {\n display: flex;\n flex-direction: row;\n }\n\n .exampleCell {\n flex-grow: 1;\n }\n\n .exampleRow,\n .exampleCell {\n margin: 10px;\n padding: 10px;\n background-color: rgba(0, 0, 0, 0.2);\n cursor: move;\n cursor: grab;\n cursor: -moz-grab;\n cursor: -webkit-grab;\n }\n
\n
\n \n \n // JS\n.controller('NestedNgRepeatWithModel', ['$timeout', '$scope', '$element', 'dragularService', function NestedNgRepeatWithModelCtrl($timeout, $scope, $element, dragularService) {\n $timeout(function() { // timeount due to nested ngRepeat to be ready\n var container = $element.children().eq(0).children(),\n parentContainers = container.children(),\n nestedContainers = [];\n\n dragularService(container, {\n moves: function(el, container, handle) {\n return handle.classList.contains('row-handle');\n },\n containersModel: $scope.items,\n nameSpace: 'rows'\n });\n\n // collect nested contianers\n for (var i = 0; i < parentContainers.length; i++) {\n nestedContainers.push(parentContainers.eq(i).children()[1]);\n }\n\n dragularService(nestedContainers, {\n moves: function(el, container, handle) {\n return !handle.classList.contains('row-handle');\n },\n containersModel: (function getNestedContainersModel(){\n var parent = $scope.items,\n containersModel = [];\n for (var i = 0; i < parent.length; i++) {\n containersModel.push(parent[i].items);\n }\n return containersModel;\n })(),\n nameSpace: 'cells'\n });\n }, 0);\n $scope.items = [{\n items: [{\n content: 'Item a1'\n }, {\n content: 'Item a2'\n }, {\n content: 'Item a3'\n }, {\n content: 'Item a4'\n }]\n }, {\n items: [{\n content: 'Item b1'\n }, {\n content: 'Item b2'\n }, {\n content: 'Item b3'\n }, {\n content: 'Item b4'\n }]\n }, {\n items: [{\n content: 'Item c1'\n }, {\n content: 'Item c2'\n }, {\n content: 'Item c3'\n }, {\n content: 'Item c4'\n }]\n }];\n }])\n
\n
\n\n \n // HTML:\n <div class='containerVertical'>\n <div ng-repeat="item in items">\n {{item.content}}\n </div>\n </div>\n\n // JS:\n dragularService($element.children());\n $scope.items = [{\n content: 'Try to add or remove some elements (click on +- buttons), you will see that it is not problem for dragular.'\n },{\n content: 'Item 2'\n },{\n content: 'Item 3'\n },{\n content: 'Item 4'\n }];\n
\n
\n Move stuff between these two filtered containers. You can play with filter inputs to see that everything goes right.\n
\n Please notify the getFilteredModel function, it is necessery for not replacing the initial array object with new filtered one!
Items1:\n\n
{{items1 | json}}
Items2:\n\n
{{items2 | json}}
\n\n\n// JS\n .controller('NgRepeatFilteredWithModel', ['$scope', '$element', 'dragularService', '$filter', function TodoCtrl($scope, $element, dragularService, $filter) {\n $scope.items1 = [{\n content: 'Move me, but you can only drop me in one of these containers.'\n }, {\n content: 'If you try to drop me somewhere other than these containers, I\\'ll just come back.'\n }, {\n content: 'Apple 3'\n }, {\n content: 'Orange 4'\n }, {\n content: 'Orange 5'\n }, {\n content: 'Apple 6'\n }, {\n content: 'Apple 7'\n }, {\n content: 'Apple 8'\n }];\n $scope.items2 = [{\n content: 'Apple 9'\n }, {\n content: 'Orange 10'\n }, {\n content: 'Orange 11'\n }, {\n content: 'Apple 12'\n }, {\n content: 'Orange 13'\n }, {\n content: 'Apple 14'\n }];\n $scope.filter1query = 'Orange';\n $scope.filter2query = 'Orange';\n $scope.filteredModel1 = [];\n $scope.filteredModel2 = [];\n $scope.getFilteredModel = function (filteredModel, items, filterQuery) {\n filteredModel.length = 0;\n /*\n * Following one-liner is same like:\n * var filteredModelTemp = $filter('filter')(items, filterQuery);\n * angular.forEach(filteredModelTemp, function(item){\n * filteredModel.push(item);\n * });\n * Or like:\n * var filteredModelTemp = $filter('filter')(items, filterQuery);\n * for(var i; i < filteredModelTemp.length; i++){\n * filteredModel.push(filteredModelTemp[i]);\n * }\n *\n * You cannot just assign filtered array to filteredModel like this:\n * filteredModel = $filter('filter')(items, filterQuery);\n * Because you would replace the array object you provide to dragular with new one.\n * So dragular will continue to use the one it was provided on init.\n * Hopefully I make it clear. :)\n */\n [].push.apply(filteredModel, $filter('filter')(items, filterQuery));\n return filteredModel;\n };\n var containers = $element.children().eq(1).children();\n dragularService.cleanEnviroment();\n dragularService([containers[0],containers[1]],{\n containersModel: [$scope.items1, $scope.items2],\n containersFilteredModel: [$scope.filteredModel1, $scope.filteredModel2]\n });\n }]);\n\n
\n\n<!-- HTML -->\n <div class='wrapper' ng-controller="NgRepeatFilteredWithModel">\n <div class="tableRow">\n <div class='containerVertical'>\n <input ng-model="filter1query" style="margin:10px 10px">\n </div>\n <div class='containerVertical'>\n <input ng-model="filter2query" style="margin:10px 10px">\n </div>\n </div>\n <div class='tableRow'>\n <div class='containerVertical'>\n <div ng-repeat="item in getFilteredModel(filteredModel1, items1, filter1query)">{{item.content}}</div>\n </div>\n <div class='containerVertical'>\n <div ng-repeat="item in getFilteredModel(filteredModel2, items2, filter2query)">{{item.content}}</div>\n </div>\n </div>\n <div class="tableRow">\n <div class='containerVertical'>\n <pre>Items1:\n <br/>{{items1 | json}}</pre>\n </div>\n <div class='containerVertical'>\n <pre>Items2:\n <br/>{{items2 | json}}</pre>\n </div>\n </div>\n </div>\n
\n
\n \n // HTML:\n <div class='wrapper' ng-controller="NgRepeatWithModel">\n <div class='containerVertical'>\n <div ng-repeat="item in items">\n {{item.content}}\n <button class='cursorDefault' ng-click="addItem()">+</button>\n <button class='cursorDefault' ng-click="removeItem()">x</button>\n </div>\n </div>\n </div>\n
\n
\n \n \n // JS:\n controller('NgRepeatWithModel', ['$scope', '$element', 'dragularService', function TodoCtrl($scope, $element, dragularService) {\n $scope.items = [{\n content: 'Try to add or remove some elements (click on +- buttons), you will see that it is not problem for dragular.'\n }, {\n content: 'Item 2'\n }, {\n content: 'Item 3'\n }, {\n content: 'Item 4'\n }];\n dragularService($element.children().eq(0).children(), {containersModel: $scope.items});\n $scope.addItem = function addItem() {\n var index = $scope.items.indexOf(this.item) + 1;\n $scope.items.splice(index, 0, {\n content: this.item.content + '-copy'\n });\n };\n $scope.removeItem = function removeItem() {\n var index = $scope.items.indexOf(this.item);\n $scope.items.splice(index, 1);\n };\n }])\n
\n
\n\n \n dragularService([document.getElementById(single)], { removeOnSpill: true });\n
\n
\n Items1:\n\n
{{items1 | json}}
Items2:\n\n
{{items2 | json}}
\n\n\n// JS\n .controller('RemoveOnSpillWithModel', ['$scope', '$element', 'dragularService', function TodoCtrl($scope, $element, dragularService) {\n $scope.items1 = [{\n content: 'Move me, but you can only drop me in containers.'\n }, {\n content: 'If you try to drop me somewhere other than containers, I\\'ll die a fiery death.'\n }, {\n content: 'Item 3'\n }, {\n content: 'Item 4'\n }];\n $scope.items2 = [{\n content: 'You can drop me in the left container.'\n }, {\n content: 'Item 6'\n }, {\n content: 'Item 7'\n }, {\n content: 'Item 8'\n }];\n var containers = $element.children().eq(0).children();\n dragularService.cleanEnviroment();\n dragularService([containers[0],containers[1]],{\n containersModel: [$scope.items1, $scope.items2],\n removeOnSpill: true\n });\n }])\n
\n\n<!-- HTML -->\n<div class='wrapper' ng-controller="Basic">\n <div class='tableRow'>\n <div class='containerVertical'>\n <div ng-repeat="item in items1">{{item.content}}</div>\n </div>\n <div class='containerVertical'>\n <div ng-repeat="item in items2">{{item.content}}</div>\n </div>\n </div>\n <div class="tableRow">\n <div class="container">\n <div>Items1:\n <br/>{{items1 | json}}</div>\n </div>\n <div class="container">\n <div>Items2:\n <br/>{{items2 | json}}</div>\n </div>\n </div>\n</div>\n
\n
\n \n dragularService([document.getElementById(left), document.getElementById(right)], { revertOnSpill: true });\n
\n
\n \n \n// JS\ncontroller(\'ScrollingDrag\', [\'$interval\', \'$element\', \'dragularService\', function TodoCtrl($interval, $element, dragularService) {\n\n\n var timer,\n leftScrollContainer = document.getElementById(\'leftScroll\'),\n rightScrollContainer = document.getElementById(\'rightScroll\'),\n leftTopBar = document.getElementById(\'leftTopBar\'),\n leftBottomBar = document.getElementById(\'leftBottomBar\'),\n rightTopBar = document.getElementById(\'rightTopBar\'),\n rightBottomBar = document.getElementById(\'rightBottomBar\');\n\n dragularService.cleanEnviroment();\n dragularService([leftScrollContainer, rightScrollContainer]);\n\n registerEvents(leftTopBar, leftScrollContainer, -5);\n registerEvents(leftBottomBar, leftScrollContainer, 5);\n registerEvents(rightTopBar, rightScrollContainer, -5);\n registerEvents(rightBottomBar, rightScrollContainer, 5);\n\n function registerEvents(bar, container, inc, speed) {\n if (!speed) {\n speed = 20;\n }\n angular.element(bar).on(\'dragularenter\', function() {\n container.scrollTop += inc;\n timer = $interval(function moveScroll() {\n container.scrollTop += inc;\n }, speed);\n });\n angular.element(bar).on(\'dragularleave dragularrelease\', function() {\n $interval.cancel(timer);\n });\n }\n }])\n
\n
\n \n \n<!-- HTML -->\n<div ng-controller="ScrollingDrag">\n <div class="containerVertical scrollingDrag">\n <div class="scrollBar" id="leftTopBar">up</div>\n <div id="leftScroll" class="scrollingDragInner">\n <div>Item 1</div>\n <div>Item 2</div>\n ...\n </div>\n <div class="scrollBar" id="leftBottomBar">down</div>\n </div>\n <div class="containerVertical scrollingDrag">\n <div class="scrollBar" id="rightTopBar">up</div>\n <div id="rightScroll" class="scrollingDragInner">\n <div>Item 1</div>\n <div>Item 2</div>\n ...\n </div>\n <div class="scrollBar" id="rightBottomBar">down</div>\n </div>\n </div>\n
\n
\n \n \n// CSS\n.scrollingDrag {\n width: 45%;\n display: inline-block;\n}\n\n.scrollingDragInner {\n max-height: 200px;\n overflow-y: auto;\n}\n\n#rightTopBar,\n#rightBottomBar {\n background: transparent;\n position: relative;\n height: 20px;\n}\n\n#rightTopBar {\n top: 10px;\n}\n\n#rightBottomBar {\n bottom: 10px;\n}\n\ndiv.scrollBar {\n background: yellow;\n text-align: center;\n padding: 1px;\n}\n\n
\n
\n\n \n
\n \n \nBrowser support includes every sane browser and **IE7+**. _(Granted you polyfill the functional `Array` methods in ES5)_
\nI 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.
\nActual version 4.4.6 is based on dragula 3.6.3 and tested with angular 1.5.5.
\nIt's important to us that you feel you can contribute towards the evolution of Dragular. This can take many forms: from helping to fix bugs or improve the docs, to adding in new features to the source. This guide should help you in making that process as smooth as possible.
\nBefore contributing, please read the code of conduct.
\nGitHub Issues is the place to report bugs you may have found in either the core library or any of the examples that are part of the repository. When submitting a bug please do the following:
\n1. Search for existing issues. Your bug may have already been fixed or addressed in a development branch version of Dragular, so be sure to search the issues first before putting in a duplicate issue.
\n2. Not sure if it's a bug?. Then please ask via issues and tag it [question].
\n3. Create an isolated and reproducible test case. If you are reporting a bug, make sure you also have a minimal, runnable, code example that reproduces the problem you have.
\n4. Include a live example. After narrowing your code down to only the problem areas, make use of Codepen, jsBin, or a link to your live site so that we can view a live example of the problem. (you can start by forking this codepen)
\n5. Share as much information as possible. Include browser version affected, your OS, version of the library, steps to reproduce, etc. "X isn't working!!!1!" will probably just be closed.
\nThe dev branch of Dragular is our 'current working' version. It is always ahead of the master branch in terms of features and fixes. However it's also bleeding-edge and experimental and we cannot and do not guarantee it will compile or work for you. Very often we have to break things for a few days while we rebuild and patch. So by all means please export the dev branch and contribute towards it, indeed that is where all Pull Requests should be sent, but do so understanding the API may change beneath you.
\nTo take advantage of our npm build script and jshint config it will be easiest for you if you have node.js installed locally.
\nYou can download node.js from nodejs.org.
\nAfter that you can clone the repository and run npm i
inside the cloned folder. This will install dependencies necessary for building the project. For development workflow automation dragular uses gulp >= 3.9.0
. Before starting development, make sure that gulp
is installed on your machine globally: npm i -g gulp
.
There are several gulp tasks that are used for generating different builds:
\ngulp dev
- Serves files with BrowserSync server, watches & automatically refreshes connected browsers on changes, generates non-minified but concatenated styles & scripts from the dragular source.gulp dev:docs
- Does exactly the same as gulp dev
, except it works with the documentation source.gulp build
- Concatenates and minifies dragular source files.gulp build:docs
- Concatenates and minifies documentation source files.gulp lint
& gulp lint:docs
- Lint JavaScript files.Once that is ready, make your changes and submit a Pull Request:
\nSend Pull Requests to the dev
branch. All Pull Requests must be sent to the dev
branch, master
is the latest release and PRs to that branch will be closed.
Ensure changes are jshint validated. Our JSHint configuration file is provided in the repository and you should check against it before submitting.
\nOnly commit relevant changes. Don't include changes that are not directly relevant to the fix you are making. The more focused a PR is, the faster it will get attention and be merged. Extra files changing only whitespace or trash files will likely get your PR closed.
\nDependencies for building from source and running tests:
\nIf your PR is doing little more than changing the Dragular source code into a format / coding style that you prefer then we will automatically close it. All PRs must adhere to the coding style already set-out across the lines of code in Dragular. Your personal preferences for how things should "look" or be structured do not apply here, sorry. PRs should fix bugs, fix documentation or add features. No changes for the sake of change.
\nThat is fine too. While Pull Requests are the best thing in the world for us, they are not the only way to help. You're welcome to post fixes to our forum or even just email them to us. All we ask is that you still adhere to the guidelines presented here re: JSHint, etc.
\n')}])}])}); //# sourceMappingURL=examples.min.js.map diff --git a/docs/dist/examples.min.js.map b/docs/dist/examples.min.js.map index fc061c1f..b03205a1 100644 --- a/docs/dist/examples.min.js.map +++ b/docs/dist/examples.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["examples.js"],"names":["root","factory","exports","module","define","amd","a","i","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","dragular","angular","examplesRouter","BasicCtrl","BasicModelCtrl","BoundingBoxCtrl","BoundingBoxLockXCtrl","BoundingBoxLockYCtrl","CopyCtrl","CopyModelCtrl","CustomClassesCtrl","DifferentOptionsModelCtrl","DirectiveCtrl","DirectiveModelCtrl","DragOverEventsCtrl","EventsCtrl","HandleCtrl","IsContainerModelCtrl","NameSpacesCtrl","NestedNgRepeatCtrl","NestedNgRepeatWithModelCtrl","NgRepeatCtrl","NgRepeatFilteredWithModelCtrl","NgRepeatWithModelCtrl","RemoveOnSpillCtrl","RemoveOnSpillWithModelCtrl","RevertOnSpillCtrl","ScrollingDragCtrl","NestedRepeatsWithCustomDirective","config","controller","$scope","examplesList","template","link","title","highlightCode","document","getElementsByTagName","length","codeBlocks","hljs","highlightBlock","rowOffcanvas","toggleSidebar","element","getElementById","toggleClass","dragularDirective","dragularService","directive","restrict","iElm","iAttrs","tryJson","json","JSON","parse","e","options","$eval","dragularModel","containersModel","scope","dragularNameSpace","nameSpace","split","dragularOnInit","onInit","$inject","shared","classesCache","containersCtx","containers","mirror","source","item","copy","sourceItem","sourceModel","sourceFilteredModel","target","targetCtx","targetModel","lastDropTarget","offsetX","offsetY","moveX","moveY","offsetXr","offsetYb","clientX","clientY","mirrorWidth","mirrorHeight","initialSibling","currentSibling","initialIndex","currentIndex","tempModel","dragOverEvents","lastElementBehindCursor","grabbed","$rootScope","$compile","service","arg0","arg1","processServiceArguments","arguments","_isArray","isElement","initialContainers","querySelectorAll","o","copyOptions","extendOptions","tmp","extend","defaultOptions","classes","defaultClasses","eventNames","defaultEventNames","processOptionsObject","boundingBox","sanitizeContainers","containersFilteredModel","forEach","cont","len","getContainers","Error","indexOf","push","getContainersModel","fm","registerEvents","remove","op","regEvent","_docElm","release","container","grab","name","eventName","_doc","createEvent","initEvent","createEventObject","eventType","whichMouseButton","metaKey","ctrlKey","context","canStart","eventualMovements","type","isInput","focus","preventDefault","startBecauseMouseMoved","drake","dragging","originalEvent","g","ignoreInputTextSelection","getCoord","elementBehindCursor","elementFromPoint","movements","end","start","direction","getParent","parent","parentNode","parentHeight","offsetHeight","parentWidth","offsetWidth","childHeight","clientHeight","childWidth","clientWidth","offset","getOffset","left","top","right","bottom","renderMirrorImage","addClass","transit","style","drag","preventGrabbed","handle","isContainer","invalid","moves","nextEl","clone","$emit","dragularcloned","containerIndex","domIndexOf","dragulardrag","manualStart","rect","getBoundingClientRect","cloneNode","width","height","getRectWidth","getRectHeight","mirrorContainer","appendChild","body","unselectable","scrollContainer","drop","ungrab","moved","notify","removeOnSpill","spillOver","spillOut","pageX","pageY","offsetBox","x","y","lockY","lockX","getElementBehindPoint","dropTarget","findDropTarget","changed","fireEvent","dragularenter","dragularleave","copySortSource","removeChild","reference","immediate","getImmediateChild","getReference","revertOnSpill","insertBefore","dragularshadow","accepted","initial","isInitialPlacement","getTargetCtx","_isFunction","accepts","isContainerAccepts","canBeAccepted","rmClass","hide","s","sibling","undefined","outside","el","children","horizontal","inside","resolve","after","point","state","className","isContainerModel","opt","_getContainers","containersType","to2d","cancel","revert","reverts","dragularcancel","cleanup","dragularrelease","afterDrop","dragulardrop","dropIndex","compileItemOnDrop","$applyAsync","content","splice","dropElmModel","dontCopyModel","dragularremove","removeMirrorImage","dragularout","dragulardragend","destroy","removeContainers","all","changes","makeArray","index","before","scrollTop","deltaY","stopPropagation","depSanitize","getBool","dragularover","never","getEmptyArray","always","sanitizeContainersModel","evaluated","fn","touch","mouseup","mousedown","mousemove","pointers","microsoft","$el","addEventListener","opConvert","on","off","passive","navigator","pointerEnabled","msPointerEnabled","startIndex","Array","prototype","slice","touches","which","buttons","button","getScroll","scrollProp","offsetProp","window","scrollLeft","manually","nextSibling","nodeType","nextElementSibling","obj","HTMLElement","nodeName","lookupClass","cached","lastIndex","RegExp","current","test","replace","trim","getEventHost","targetTouches","changedTouches","coord","host","missMap","tagName","isEditable","contentEditable","child","extra","dispatchEvent","prop","args","apply","documentElement","isArray","isFunction","cleanEnviroment","$stateProvider","$urlRouterProvider","otherwise","timer","ctrl","$state","$stateParams","$timeout","go","url","templateUrl","$element","items1","items2","eq","containerLeft","querySelector","containerRight","dragularOptions","parentElement","removeClass","notContainer","getElementsByClassName","myFn","$on","Events2Ctrl","classList","contains","cartModel","removeItem","items","parentContainers","nestedContainers","addItem","$filter","filter1query","filter2query","filteredModel1","filteredModel2","getFilteredModel","filteredModel","filterQuery","$interval","bar","inc","speed","leftScrollContainer","rightScrollContainer","leftTopBar","leftBottomBar","rightTopBar","rightBottomBar","questions","text","points","order","age","QuestionsDirective","question","QuestionsController","run","$templateCache","put"],"mappings":"CAAA,SAA2CA,EAAMC,GAChD,GAAsB,gBAAZC,UAA0C,gBAAXC,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C5DD,EAAeC,IAAI,2DAA2D,4xEAC9ED,EAAeC,IAAI,mDAAmD,o3JACtED,EAAeC,IAAI,mCAAmC;AACtDD,EAAeC,IAAI,mCAAmC,6pBACtDD,EAAeC,IAAI,+DAA+D,0sGAClFD,EAAeC,IAAI,2CAA2C,gjEAC9DD,EAAeC,IAAI,mDAAmD,+wFACtED,EAAeC,IAAI,qEAAqE,85HACxFD,EAAeC,IAAI,uFAAuF,gfAC1GD,EAAeC,IAAI,uCAAuC,i+BAC1DD,EAAeC,IAAI,yEAAyE,q/JAC5FD,EAAeC,IAAI,yDAAyD,slEAC5ED,EAAeC,IAAI,iDAAiD,8kCACpED,EAAeC,IAAI,mEAAmE,ujFACtFD,EAAeC,IAAI,iDAAiD,osCACpED,EAAeC,IAAI,iDAAiD,+3IACpED,EAAeC,IAAI,mCAAmC;AACtDD,EAAeC,IAAI,6BAA6B,syBAChDD,EAAeC,IAAI,6BAA6B,yuGAChDD,EAAeC,IAAI,yCAAyC","file":"examples.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse {\n\t\tvar a = factory();\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n\n\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* global angular, hljs */\n\t'use strict';\n\n\t// var angular = require('angular');\n\n\tvar dragular = __webpack_require__(1);\n\n\tangular\n\t\t.module('examplesApp', [dragular, 'templates', 'ui.router']);\n\n\tvar examplesRouter = __webpack_require__(4);\n\tvar BasicCtrl = __webpack_require__(5);\n\tvar BasicModelCtrl = __webpack_require__(6);\n\tvar BoundingBoxCtrl = __webpack_require__(7);\n\tvar BoundingBoxLockXCtrl = __webpack_require__(8);\n\tvar BoundingBoxLockYCtrl = __webpack_require__(9);\n\tvar CopyCtrl = __webpack_require__(10);\n\tvar CopyModelCtrl = __webpack_require__(11);\n\tvar CustomClassesCtrl = __webpack_require__(12);\n\tvar DifferentOptionsModelCtrl = __webpack_require__(13);\n\tvar DirectiveCtrl = __webpack_require__(14);\n\tvar DirectiveModelCtrl = __webpack_require__(15);\n\tvar DragOverEventsCtrl = __webpack_require__(16);\n\tvar EventsCtrl = __webpack_require__(17);\n\tvar HandleCtrl = __webpack_require__(18);\n\tvar IsContainerModelCtrl = __webpack_require__(19);\n\tvar NameSpacesCtrl = __webpack_require__(20);\n\tvar NestedNgRepeatCtrl = __webpack_require__(21);\n\tvar NestedNgRepeatWithModelCtrl = __webpack_require__(22);\n\tvar NgRepeatCtrl = __webpack_require__(23);\n\tvar NgRepeatFilteredWithModelCtrl = __webpack_require__(24);\n\tvar NgRepeatWithModelCtrl = __webpack_require__(25);\n\tvar RemoveOnSpillCtrl = __webpack_require__(26);\n\tvar RemoveOnSpillWithModelCtrl = __webpack_require__(27);\n\tvar RevertOnSpillCtrl = __webpack_require__(28);\n\tvar ScrollingDragCtrl = __webpack_require__(29);\n\tvar NestedRepeatsWithCustomDirective = __webpack_require__(30);\n\t__webpack_require__(31);\n\n\t/**\n\t * Module Example App\n\t *\n\t * DEMO app for dragular https://github.com/luckylooke/dragular\n\t */\n\n\tangular\n\t .module('examplesApp')\n\t .config(examplesRouter)\n\t .controller('Basic', BasicCtrl)\n\t .controller('BasicModel', BasicModelCtrl)\n\t .controller('BoundingBox', BoundingBoxCtrl)\n\t .controller('BoundingBoxLockX', BoundingBoxLockXCtrl)\n\t .controller('BoundingBoxLockY', BoundingBoxLockYCtrl)\n\t .controller('Copy', CopyCtrl)\n\t .controller('CopyModel', CopyModelCtrl)\n\t .controller('CustomClasses', CustomClassesCtrl)\n\t .controller('DifferentOptionsModel', DifferentOptionsModelCtrl)\n\t .controller('Directive', DirectiveCtrl)\n\t .controller('DirectiveModel', DirectiveModelCtrl)\n\t .controller('DragOverEvents', DragOverEventsCtrl)\n\t .controller('Events', EventsCtrl[0])\n\t .controller('Events2', EventsCtrl[1])\n\t .controller('Handle', HandleCtrl)\n\t .controller('IsContainerModel', IsContainerModelCtrl)\n\t .controller('NameSpaces', NameSpacesCtrl)\n\t .controller('NestedNgRepeat', NestedNgRepeatCtrl)\n\t .controller('NestedNgRepeatWithModel', NestedNgRepeatWithModelCtrl)\n\t .controller('NgRepeat', NgRepeatCtrl)\n\t .controller('NgRepeatFilteredWithModel', NgRepeatFilteredWithModelCtrl)\n\t .controller('NgRepeatWithModel', NgRepeatWithModelCtrl)\n\t .controller('RemoveOnSpill', RemoveOnSpillCtrl)\n\t .controller('RemoveOnSpillWithModel', RemoveOnSpillWithModelCtrl)\n\t .controller('RevertOnSpill', RevertOnSpillCtrl)\n\t .controller('ScrollingDrag', ScrollingDragCtrl)\n\t .controller('NestedRepeatsWithCustomDirective', NestedRepeatsWithCustomDirective)\n\t .controller('ExAppCtrl', ['$scope', function($scope) {\n\t $scope.examplesList = [{\n\t template: 'docsInstall/docsInstall.html',\n\t link: 'docsInstall',\n\t title: 'Installation'\n\t },{\n\t template: 'exampleBasic/exampleBasic.html',\n\t link: 'exampleBasic',\n\t title: 'Basic'\n\t },{\n\t template: 'exampleBasicWithModel/exampleBasicWithModel.html',\n\t link: 'exampleBasicWithModel',\n\t title: 'Basic - with model'\n\t },{\n\t template: 'exampleDifferentOptionsWithModel/exampleDifferentOptionsWithModel.html',\n\t link: 'exampleDifferentOptionsWithModel',\n\t title: 'Different options - with model'\n\t }, {\n\t template: 'exampleDirective/exampleDirective.html',\n\t link: 'exampleDirective',\n\t title: 'Directive'\n\t }, {\n\t template: 'exampleDirectiveWithModel/exampleDirectiveWithModel.html',\n\t link: 'exampleDirectiveWithModel',\n\t title: 'Directive - with model'\n\t }, {\n\t template: 'exampleEvents/exampleEvents.html',\n\t link: 'exampleEvents',\n\t title: 'Events'\n\t }, {\n\t template: 'exampleRemoveOnSpill/exampleRemoveOnSpill.html',\n\t link: 'exampleRemoveOnSpill',\n\t title: 'Remove on spill'\n\t }, {\n\t template: 'exampleRemoveOnSpillWithModel/exampleRemoveOnSpillWithModel.html',\n\t link: 'exampleRemoveOnSpillWithModel',\n\t title: 'Remove on spill - with model'\n\t }, {\n\t template: 'exampleRevertOnSpill/exampleRevertOnSpill.html',\n\t link: 'exampleRevertOnSpill',\n\t title: 'Revert on spill'\n\t }, {\n\t template: 'exampleCopy/exampleCopy.html',\n\t link: 'exampleCopy',\n\t title: 'Copy'\n\t }, {\n\t template: 'exampleCopyWithModel/exampleCopyWithModel.html',\n\t link: 'exampleCopyWithModel',\n\t title: 'Copy - with model'\n\t }, {\n\t template: 'exampleHandle/exampleHandle.html',\n\t link: 'exampleHandle',\n\t title: 'Handle'\n\t }, {\n\t template: 'exampleIsContainerWithModel/exampleIsContainerWithModel.html',\n\t link: 'exampleIsContainerWithModel',\n\t title: 'isContainer - with model'\n\t }, {\n\t template: 'exampleCustomClasses/exampleCustomClasses.html',\n\t link: 'exampleCustomClasses',\n\t title: 'Custom classes'\n\t }, {\n\t template: 'exampleNameSpaces/exampleNameSpaces.html',\n\t link: 'exampleNameSpaces',\n\t title: 'NameSpaces'\n\t }, {\n\t template: 'exampleDragOverEvents/exampleDragOverEvents.html',\n\t link: 'exampleDragOverEvents',\n\t title: 'Drag-over events'\n\t }, {\n\t template: 'exampleBoundingBox/exampleBoundingBox.html',\n\t link: 'exampleBoundingBox',\n\t title: 'BoundingBox'\n\t }, {\n\t template: 'exampleBoundingBoxLockX/exampleBoundingBoxLockX.html',\n\t link: 'exampleBoundingBoxLockX',\n\t title: 'BoundingBox + LockX'\n\t }, {\n\t template: 'exampleBoundingBoxLockY/exampleBoundingBoxLockY.html',\n\t link: 'exampleBoundingBoxLockY',\n\t title: 'BoundingBox + LockY'\n\t }, {\n\t template: 'exampleNgRepeat/exampleNgRepeat.html',\n\t link: 'exampleNgRepeat',\n\t title: 'ngRepeat'\n\t }, {\n\t template: 'exampleNgRepeatWithModel/exampleNgRepeatWithModel.html',\n\t link: 'exampleNgRepeatWithModel',\n\t title: 'ngRepeat - with model'\n\t }, {\n\t template: 'exampleNgRepeatFilteredWithModel/exampleNgRepeatFilteredWithModel.html',\n\t link: 'exampleNgRepeatFilteredWithModel',\n\t title: 'Filtered ngRepeat - with model'\n\t }, {\n\t template: 'exampleNestedNgRepeat/exampleNestedNgRepeat.html',\n\t link: 'exampleNestedNgRepeat',\n\t title: 'Nested ngRepead'\n\t }, {\n\t template: 'exampleNestedNgRepeatWithModel/exampleNestedNgRepeatWithModel.html',\n\t link: 'exampleNestedNgRepeatWithModel',\n\t title: 'Nested ngRepead - with model'\n\t }, {\n\t template: 'exampleScrollingDrag/exampleScrollingDrag.html',\n\t link: 'exampleScrollingDrag',\n\t title: 'Scrolling drag'\n\t }, {\n\t template: 'exampleSNestedRepeatsWithCustomDirective/exampleNestedRepeatsWithCustomDirective.html',\n\t link: 'exampleNestedRepeatsWithCustomDirective',\n\t title: 'Nested repeats with custom directive'\n\t }];\n\n\t $scope.highlightCode = function () {\n\t if(document.getElementsByTagName('code').length){\n\t var codeBlocks = document.getElementsByTagName('code');\n\t for (var i = codeBlocks.length - 1; i >= 0; i--) {\n\t hljs.highlightBlock(codeBlocks[i]);\n\t }\n\t }\n\t };\n\n\t var rowOffcanvas;\n\t $scope.toggleSidebar = function toggleSidebar () {\n\t if(!rowOffcanvas){\n\t rowOffcanvas = angular.element(document.getElementById('rowOffcanvas'));\n\t }\n\t rowOffcanvas.toggleClass('active');\n\t };\n\n\t }]);\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* global angular */\n\t'use strict';\n\tvar dragularDirective = __webpack_require__( 2 );\n\tvar dragularService = __webpack_require__( 3 );\n\n\t/**\n\t * Dragular 4.4.6 by Luckylooke https://github.com/luckylooke/dragular\n\t * Angular version of dragula https://github.com/bevacqua/dragula\n\t */\n\tmodule.exports = 'dragularModule';\n\n\tangular\n\t\t.module( 'dragularModule', [] )\n\t\t.factory( 'dragularService', dragularService )\n\t\t.directive( 'dragular', dragularDirective );\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\t/**\n\t * dragular Directive by Luckylooke https://github.com/luckylooke/dragular\n\t * Angular version of dragula https://github.com/bevacqua/dragula\n\t */\n\n\tvar dragular = function ( dragularService ) {\n\t\treturn {\n\t\t\trestrict: 'A',\n\t\t\tlink: function ( $scope, iElm, iAttrs ) {\n\n\t\t\t\tvar options = $scope.$eval( iAttrs.dragular ) || tryJson( iAttrs.dragular ) || {};\n\n\t\t\t\tfunction tryJson( json ) {\n\t\t\t\t\ttry { // I dont like try catch solutions but I havent find sattisfying way of chcecking json validity.\n\t\t\t\t\t\treturn JSON.parse( json );\n\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( iAttrs.dragularModel ) {\n\t\t\t\t\toptions.containersModel = iAttrs.dragularModel;\n\t\t\t\t\tif ( !options.scope ){\n\t\t\t\t\t\toptions.scope = $scope;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( iAttrs.dragularNameSpace ) {\n\t\t\t\t\toptions.nameSpace = iAttrs.dragularNameSpace.split( ' ' );\n\t\t\t\t}\n\n\t\t\t\tif ( iAttrs.dragularOnInit ) {\n\t\t\t\t\toptions.onInit = $scope.$eval( iAttrs.dragularOnInit );\n\t\t\t\t}\n\n\t\t\t\tdragularService( iElm[ 0 ], options );\n\t\t\t}\n\t\t};\n\t};\n\n\tdragular.$inject = [ 'dragularService' ];\n\n\tmodule.exports = dragular;\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports) {\n\n\t/* global angular */\n\t'use strict';\n\n\t/**\n\t * dragular Service by Luckylooke https://github.com/luckylooke/dragular\n\t * Angular version of dragula https://github.com/bevacqua/dragula\n\t */\n\n\tvar shared = { // sahred object between all service instances\n\t\tclassesCache: {}, // classes lookup cache\n\t\tcontainersCtx: {}, // containers model\n\t\tcontainers: {}, // containers\n\t\tmirror: null, // mirror image\n\t\tsource: null, // source container\n\t\titem: null, // item being dragged\n\t\tcopy: null, // copy flag\n\t\tsourceItem: null, // item originaly dragged if copy is enabled\n\t\tsourceModel: null, // source container model\n\t\tsourceFilteredModel: null, // source container filtered model if relevant\n\t\ttarget: null, // droppable container under drag item\n\t\ttargetCtx: null, // target container context\n\t\ttargetModel: null, // target container model\n\t\tlastDropTarget: null, // last container item was over\n\t\toffsetX: null, // reference x\n\t\toffsetY: null, // reference y\n\t\tmoveX: null, // reference move x\n\t\tmoveY: null, // reference move y\n\t\toffsetXr: null, // reference x right for boundingBox feature\n\t\toffsetYb: null, // reference y bottom for boundingBox feature\n\t\tclientX: null, // cache client x, init at grab, update at drag\n\t\tclientY: null, // cache client y, init at grab, update at drag\n\t\tmirrorWidth: null, // mirror width for boundingBox feature\n\t\tmirrorHeight: null, // mirror height for boundingBox feature\n\t\tinitialSibling: null, // reference sibling when grabbed\n\t\tcurrentSibling: null, // reference sibling now\n\t\tinitialIndex: null, // reference model index when grabbed\n\t\tcurrentIndex: null, // reference model index now\n\t\ttempModel: null, // if o.isContainer is used, model can be provided as well, it is temporary saved here during drags\n\t\tdragOverEvents: {}, // drag over events fired on element behind cursor\n\t\tlastElementBehindCursor: null, // last element behind cursor\n\t\tgrabbed: null // holds mousedown context until first mousemove\n\t};\n\n\tvar dragularService = function ( $rootScope, $compile ) {\n\n\t\t// abbreviations\n\t\tvar _doc = document,\n\t\t\t_docElm = _doc.documentElement,\n\t\t\t_isArray = Array.isArray,\n\t\t\t_isFunction = angular.isFunction;\n\n\t\t// clean common/shared objects\n\t\tservice.cleanEnviroment = function cleanEnviroment() {\n\t\t\tshared.classesCache = {};\n\t\t\tshared.containersCtx = {};\n\t\t\tshared.containers = {};\n\t\t\tshared.mirror = undefined;\n\t\t};\n\n\t\tservice.shared = shared;\n\n\t\treturn service;\n\n\t\t// service definition\n\t\tfunction service( arg0, arg1 ) {\n\n\t\t\t// console.log('dragularService arg0, arg1', arg0, arg1);\n\n\t\t\tvar initialContainers = arg0 || [],\n\t\t\t\toptions = arg1 || {},\n\t\t\t\to, // shorthand for options\n\t\t\t\tg = getBool, // shorthand for getBool\n\n\t\t\t\t// defaults\n\t\t\t\tdefaultClasses = {\n\t\t\t\t\tmirror: 'gu-mirror',\n\t\t\t\t\thide: 'gu-hide',\n\t\t\t\t\tunselectable: 'gu-unselectable',\n\t\t\t\t\ttransit: 'gu-transit'\n\t\t\t\t},\n\t\t\t\tdefaultEventNames = {\n\t\t\t\t\t// drag-over DOM events\n\t\t\t\t\tdragularenter: 'dragularenter',\n\t\t\t\t\tdragularleave: 'dragularleave',\n\t\t\t\t\tdragularrelease: 'dragularrelease',\n\t\t\t\t\t// $scope events\n\t\t\t\t\tdragularcloned: 'dragularcloned',\n\t\t\t\t\tdragulardrag: 'dragulardrag',\n\t\t\t\t\tdragularcancel: 'dragularcancel',\n\t\t\t\t\tdragulardrop: 'dragulardrop',\n\t\t\t\t\tdragularremove: 'dragularremove',\n\t\t\t\t\tdragulardragend: 'dragulardragend',\n\t\t\t\t\tdragularshadow: 'dragularshadow',\n\t\t\t\t\tdragularover: 'dragularover',\n\t\t\t\t\tdragularout: 'dragularout'\n\t\t\t\t},\n\t\t\t\tdefaultOptions = { // options with defaults\n\t\t\t\t\tcopyOptions: false, // copy options object when provided\n\t\t\t\t\tclasses: defaultClasses, // classes used by dragular\n\t\t\t\t\teventNames: defaultEventNames, // event names used by dragular\n\t\t\t\t\tcontainers: false, // initial containers provided via options object (are provided via parameter by default)\n\t\t\t\t\tcontainersModel: false, // if provided, model will be synced with DOM\n\t\t\t\t\tcontainersFilteredModel: false, // if provided, dragular will handle filtered model cases\n\t\t\t\t\tisContainer: never, // potential target can be forced to be container by custom logic\n\t\t\t\t\tisContainerModel: getEmptyArray, // if isContainer function is provided, you can provide also respective model\n\t\t\t\t\tisContainerAccepts: always, // if isContainer function is provided, you can provide also respective accept function\n\t\t\t\t\tmoves: always, // can drag start?\n\t\t\t\t\taccepts: always, // can target accept dragged item? (target context used)\n\t\t\t\t\tcanBeAccepted: always, // can be dragged item accepted by target? (source context used)\n\t\t\t\t\tcopy: false, // dragged item will be copy of source? flag or function\n\t\t\t\t\tcopySortSource: false, // enable sorting in source when copying item\n\t\t\t\t\tdontCopyModel: false, // dont make copy of model when coping item (#61)\n\t\t\t\t\tinvalid: never, // target (in)validity function\n\t\t\t\t\trevertOnSpill: false, // item returns to original place\n\t\t\t\t\tremoveOnSpill: false, // item will be removed if not placed into valid target\n\t\t\t\t\tlockX: false, // lock movement into x-axis\n\t\t\t\t\tlockY: false, // lock movement into y-axis\n\t\t\t\t\tboundingBox: false, // lock movement inside this element boundaries\n\t\t\t\t\tmirrorContainer: _doc.body, // element for appending mirror\n\t\t\t\t\tignoreInputTextSelection: true, // text selection in inputs wont be considered as drag\n\t\t\t\t\tcompileItemOnDrop: false,\n\t\t\t\t\tonInit: false // function callback called after dragular initialisation and providing drake as first argument\n\t\t\t\t},\n\n\t\t\t\tdrake = {\n\t\t\t\t\tcontainers: shared.containers, // all containers\n\t\t\t\t\tcontainersCtx: shared.containersCtx, // all contexts to containers\n\t\t\t\t\tsanitizeContainersModel: depSanitize,\n\t\t\t\t\tsanitizeContainers: sanitizeContainers,\n\t\t\t\t\tisContainer: isContainer,\n\t\t\t\t\tstart: manualStart,\n\t\t\t\t\tend: end,\n\t\t\t\t\tcancel: cancel,\n\t\t\t\t\tremove: remove,\n\t\t\t\t\tdestroy: destroy,\n\t\t\t\t\tdragging: false\n\t\t\t\t};\n\n\t\t\tprocessServiceArguments(); // both arguments (containers and options) are optional, this function handle this\n\t\t\textendOptions();\n\t\t\tprocessOptionsObject();\n\t\t\tregisterEvents();\n\n\t\t\tif ( o.onInit ) {\n\t\t\t\to.onInit( drake, o );\n\t\t\t}\n\t\t\treturn drake;\n\n\n\t\t\t// Function definitions: ==============================================================================================================\n\n\n\t\t\t// ====================================================================================================================================\n\t\t\t// Dragular service init functions: ---------------------------------------------------------------------------------------------------\n\t\t\t// ====================================================================================================================================\n\n\n\t\t\tfunction processServiceArguments() {\n\n\t\t\t\tif ( arguments.length === 1 && // if there is only one argument we need to distinguish if it is options object or container(s) reference\n\n\t\t\t\t\t!_isArray( arg0 ) && // array of containers elements\n\t\t\t\t\t!angular.isElement( arg0 ) && // one container element\n\t\t\t\t\t!arg0[ 0 ] && // array-like object with containers elements\n\t\t\t\t\ttypeof arg0 !== 'string' ) { // selector\n\t\t\t\t\t// then arg0 is options object\n\t\t\t\t\toptions = arg0 || {};\n\t\t\t\t\tinitialContainers = []; // containers are not provided on init\n\t\t\t\t}\n\t\t\t\telse if ( typeof arg0 === 'string' ) {\n\n\t\t\t\t\tinitialContainers = document.querySelectorAll( arg0 );\n\t\t\t\t}\n\n\t\t\t\to = options.copyOptions ? angular.copy( options ) : options;\n\t\t\t}\n\n\t\t\tfunction extendOptions() {\n\n\t\t\t\tvar tmp = angular.extend( {}, defaultOptions, o ); // tmp for keeping defaults untouched\n\t\t\t\tangular.extend( o, tmp ); // merge defaults back into options\n\n\t\t\t\tif ( o.classes ) {\n\n\t\t\t\t\ttmp = angular.extend( {}, defaultClasses, o.classes );\n\t\t\t\t\tangular.extend( o.classes, tmp );\n\t\t\t\t}\n\n\t\t\t\tif ( o.eventNames ) {\n\n\t\t\t\t\ttmp = angular.extend( {}, defaultEventNames, o.eventNames );\n\t\t\t\t\tangular.extend( o.eventNames, tmp );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction processOptionsObject() {\n\n\t\t\t\t// bounding box must be pure DOM element, not jQuery wrapper or something else..\n\t\t\t\tif ( !isElement( o.boundingBox ) ) {\n\t\t\t\t\to.boundingBox = false;\n\t\t\t\t}\n\n\t\t\t\t// initial containers provided via options are higher priority then by parameter\n\t\t\t\tif ( o.containers ) {\n\t\t\t\t\tinitialContainers = o.containers;\n\t\t\t\t}\n\n\t\t\t\t// sanitize initialContainers\n\t\t\t\to.containers = sanitizeContainers( initialContainers, false, o.scope );\n\n\t\t\t\t// sanitize o.containersModel\n\t\t\t\to.containersModel = sanitizeContainers( o.containersModel, true, o.scope );\n\n\t\t\t\t// sanitize o.containersFilteredModel\n\t\t\t\tif ( _isArray( o.containersFilteredModel ) ) {\n\t\t\t\t\t// |-------- is 2D array? -----------|\n\t\t\t\t\to.containersFilteredModel = _isArray( o.containersFilteredModel[ 0 ] ) ? o.containersFilteredModel : [ o.containersFilteredModel ];\n\t\t\t\t} else {\n\t\t\t\t\to.containersFilteredModel = [];\n\t\t\t\t}\n\n\t\t\t\t// feed containers groups and optionaly do same for models\n\t\t\t\tif ( !o.nameSpace ) {\n\t\t\t\t\to.nameSpace = [ 'dragularCommon' ];\n\t\t\t\t}\n\n\t\t\t\tif ( !_isArray( o.nameSpace ) ) {\n\t\t\t\t\to.nameSpace = [ o.nameSpace ];\n\t\t\t\t}\n\n\t\t\t\to.nameSpace.forEach( function eachNameSpace( nameSpace ) {\n\n\t\t\t\t\tif ( !shared.containers[ nameSpace ] ) {\n\n\t\t\t\t\t\tshared.containers[ nameSpace ] = [];\n\t\t\t\t\t\tshared.containersCtx[ nameSpace ] = [];\n\t\t\t\t\t}\n\n\t\t\t\t\tvar len = getContainers( o ).length,\n\t\t\t\t\t\tcont;\n\n\t\t\t\t\tfor ( var i = 0; i < len; i++ ) {\n\n\t\t\t\t\t\tcont = getContainers( o )[ i ];\n\n\t\t\t\t\t\tif (!cont) {\n\t\t\t\t\t\t\tthrow new Error( 'Container element must be defined!' );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (shared.containers[ nameSpace ].indexOf(cont) !== -1) {\n\t\t\t\t\t\t\tthrow new Error( 'Cannot register container element more than once! Container element: ' );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tshared.containers[ nameSpace ].push(cont);\n\t\t\t\t\t\tshared.containersCtx[ nameSpace ].push({\n\t\t\t\t\t\t\to: o,\n\t\t\t\t\t\t\tm: getContainersModel( o )[ i ], // can be undefined\n\t\t\t\t\t\t\tfm: o.containersFilteredModel[ i ] // can be undefined\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tfunction registerEvents( remove ) {\n\t\t\t\tvar op = remove ? 'off' : 'on';\n\t\t\t\tregEvent( _docElm, op, 'mouseup', release );\n\n\t\t\t\tgetContainers( o ).forEach( function addMouseDown( container ) {\n\t\t\t\t\tregEvent( container, 'on', 'mousedown', grab );\n\t\t\t\t} );\n\n\t\t\t\tif ( !remove ) { // create dragular DOM events\n\t\t\t\t\tangular.forEach( [ 'dragularenter', 'dragularleave', 'dragularrelease' ], function prepareDragOverEvents( name ) {\n\t\t\t\t\t\tvar eventName = o.eventNames[ name ];\n\t\t\t\t\t\tif ( !shared.dragOverEvents[ eventName ] ) {\n\t\t\t\t\t\t\tif ( _doc.createEvent ) {\n\t\t\t\t\t\t\t\tshared.dragOverEvents[ eventName ] = _doc.createEvent( 'HTMLEvents' );\n\t\t\t\t\t\t\t\tshared.dragOverEvents[ eventName ].initEvent( eventName, true, true );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tshared.dragOverEvents[ eventName ] = _doc.createEventObject();\n\t\t\t\t\t\t\t\tshared.dragOverEvents[ eventName ].eventType = eventName;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\t// ====================================================================================================================================\n\t\t\t// Grab stage: ------------------------------------------------------------------------------------------------------------------------\n\t\t\t// ====================================================================================================================================\n\n\n\t\t\tfunction grab( e ) {\n\n\t\t\t\t// filter some odd situations\n\t\t\t\tif ( whichMouseButton( e ) !== 1 || e.metaKey || e.ctrlKey ) {\n\t\t\t\t\treturn; // we only care about honest-to-god left clicks and touch events\n\t\t\t\t}\n\n\t\t\t\t// set itial values\n\t\t\t\tshared.moveX = e.clientX;\n\t\t\t\tshared.moveY = e.clientY;\n\n\t\t\t\tvar context = canStart( e.target );\n\t\t\t\tif ( !context || !context.item ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tshared.grabbed = context;\n\t\t\t\teventualMovements();\n\t\t\t\tif ( e.type === 'mousedown' ) {\n\t\t\t\t\tif ( isInput( e.target ) ) { // see also: https://github.com/bevacqua/dragula/issues/208\n\t\t\t\t\t\te.target.focus(); // fixes https://github.com/bevacqua/dragula/issues/176\n\t\t\t\t\t\t// changed from context.item to e.target fixing https://github.com/luckylooke/dragular/issues/87#issuecomment-256865796\n\t\t\t\t\t} else {\n\t\t\t\t\t\te.preventDefault(); // fixes https://github.com/bevacqua/dragula/issues/155\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction eventualMovements( remove ) {\n\n\t\t\t\tvar op = remove ? 'off' : 'on';\n\t\t\t\tregEvent( _docElm, op, 'mousemove', startBecauseMouseMoved );\n\t\t\t}\n\n\t\t\tfunction startBecauseMouseMoved( e ) {\n\n\t\t\t\tif ( !shared.grabbed || drake.dragging ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( e.originalEvent ) {\n\t\t\t\t\te = e.originalEvent; // jQuery enviroment\n\t\t\t\t}\n\n\t\t\t\tif ( whichMouseButton( e ) === 0 ) {\n\t\t\t\t\trelease( {} );\n\t\t\t\t\treturn; // when text is selected on an input and then dragged, mouseup doesn't fire. this is our only hope\n\t\t\t\t}\n\n\t\t\t\t// truthy check fixes dragula-#239, equality fixes dragula-#207\n\t\t\t\tif ( e.clientX && e.clientX === shared.moveX && e.clientY && e.clientY === shared.moveY ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( g( o.ignoreInputTextSelection ) ) {\n\n\t\t\t\t\tvar clientX = getCoord( 'clientX', e ),\n\t\t\t\t\t\tclientY = getCoord( 'clientY', e ),\n\t\t\t\t\t\telementBehindCursor = _doc.elementFromPoint( clientX, clientY );\n\t\t\t\t\tif ( isInput( elementBehindCursor ) ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tvar grabbed = shared.grabbed; // calling end() unsets shared.grabbed\n\t\t\t\teventualMovements( 'remove' ); // remove mousemove listener\n\t\t\t\tmovements();\n\t\t\t\tend();\n\t\t\t\tstart( grabbed );\n\n\t\t\t\tif ( !shared.item ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// automaticly detect direction of elements if not set in options\n\t\t\t\tif ( !o.direction && getParent( shared.sourceItem ) ) {\n\t\t\t\t\tvar parent = shared.sourceItem.parentNode,\n\t\t\t\t\t\tparentHeight = parent.offsetHeight,\n\t\t\t\t\t\tparentWidth = parent.offsetWidth,\n\t\t\t\t\t\tchildHeight = shared.sourceItem.clientHeight,\n\t\t\t\t\t\tchildWidth = shared.sourceItem.clientWidth;\n\t\t\t\t\to.direction = parentHeight / childHeight < parentWidth / childWidth ? 'horizontal' : 'vertical';\n\t\t\t\t}\n\n\t\t\t\t// get initial coordinates, used to render shared.mirror for first time\n\t\t\t\tvar offset = getOffset( shared.sourceItem );\n\t\t\t\tshared.offsetX = getCoord( 'pageX', e ) - offset.left;\n\t\t\t\tshared.offsetY = getCoord( 'pageY', e ) - offset.top;\n\t\t\t\tshared.clientX = getCoord( 'clientX', e );\n\t\t\t\tshared.clientY = getCoord( 'clientY', e );\n\n\t\t\t\t// limiting area of shared.mirror movement, get initial coordinates\n\t\t\t\tif ( o.boundingBox ) {\n\t\t\t\t\tshared.offsetXr = getCoord( 'pageX', e ) - offset.right;\n\t\t\t\t\tshared.offsetYb = getCoord( 'pageY', e ) - offset.bottom;\n\t\t\t\t}\n\n\t\t\t\te.preventDefault();\n\n\t\t\t\trenderMirrorImage();\n\t\t\t\taddClass( shared.item, o.classes.transit );\n\t\t\t\t// initial position\n\t\t\t\tshared.mirror.style.left = shared.clientX - shared.offsetX + 'px';\n\t\t\t\tshared.mirror.style.top = shared.clientY - shared.offsetY + 'px';\n\n\t\t\t\tdrag( e );\n\t\t\t}\n\n\t\t\tfunction movements( remove ) {\n\n\t\t\t\tvar op = remove ? 'off' : 'on';\n\t\t\t\tregEvent( _docElm, op, 'selectstart', preventGrabbed ); // IE8\n\t\t\t\tregEvent( _docElm, op, 'click', preventGrabbed );\n\t\t\t\tregEvent( _docElm, op, 'touchmove', preventGrabbed ); // fixes touch devices scrolling while drag\n\t\t\t}\n\n\t\t\tfunction canStart( item ) {\n\t\t\t\tif ( drake.dragging && shared.mirror ) {\n\t\t\t\t\treturn; // already dragging\n\t\t\t\t}\n\n\t\t\t\tvar handle = item;\n\t\t\t\twhile ( getParent( item ) && !isContainer( getParent( item ) ) ) {\n\t\t\t\t\t// break loop if user tries to drag item which is considered invalid handle\n\t\t\t\t\tif ( o.invalid( item, handle ) ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\titem = getParent( item ); // drag target should be immediate child of container\n\t\t\t\t\tif ( !item ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tvar source = getParent( item );\n\t\t\t\tif ( !source ||\n\t\t\t\t\to.invalid( item, handle ) || !o.moves( item, source, handle, nextEl( item ) ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\treturn {\n\t\t\t\t\titem: item,\n\t\t\t\t\tsource: source\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tfunction start( context ) {\n\t\t\t\tshared.sourceItem = shared.item = context.item;\n\t\t\t\tshared.source = context.source;\n\t\t\t\tshared.initialSibling = shared.currentSibling = nextEl( context.item );\n\n\t\t\t\tif ( g( o.copy, [ context.item, context.source ] ) ) {\n\t\t\t\t\t// http://api.jquery.com/clone/#clone-withDataAndEvents-deepWithDataAndEvents\n\t\t\t\t\tshared.item = angular.element( context.item ).clone( o.copy === 'events', o.copy === 'events' )[0];\n\t\t\t\t\tshared.copy = o.copy;\n\t\t\t\t\tif ( o.scope ) {\n\t\t\t\t\t\to.scope.$emit( o.eventNames.dragularcloned, shared.item, context.item );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tshared.copy = false;\n\t\t\t\t}\n\n\t\t\t\t// prepare models operations\n\t\t\t\tvar containerIndex = getContainers( o ).indexOf( context.source );\n\t\t\t\tshared.sourceModel = getContainersModel( o )[ containerIndex ];\n\n\t\t\t\tshared.sourceFilteredModel = o.containersFilteredModel[ containerIndex ];\n\t\t\t\tshared.initialIndex = domIndexOf( context.item, context.source );\n\n\t\t\t\tdrake.dragging = true;\n\t\t\t\tif ( o.scope ) {\n\t\t\t\t\to.scope.$emit( o.eventNames.dragulardrag, shared.sourceItem, shared.source );\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tfunction manualStart( item ) {\n\t\t\t\tvar context = canStart( item );\n\t\t\t\tif ( context ) {\n\t\t\t\t\tshared.grabbed = context;\n\t\t\t\t\teventualMovements();\n\t\t\t\t\t//start(context);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction renderMirrorImage() {\n\t\t\t\tif ( shared.mirror ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tvar rect = shared.sourceItem.getBoundingClientRect();\n\t\t\t\tshared.mirror = shared.sourceItem.cloneNode( true );\n\t\t\t\tshared.mirrorWidth = rect.width;\n\t\t\t\tshared.mirrorHeight = rect.height;\n\t\t\t\tshared.mirror.style.width = getRectWidth( rect ) + 'px';\n\t\t\t\tshared.mirror.style.height = getRectHeight( rect ) + 'px';\n\t\t\t\taddClass( shared.mirror, o.classes.mirror );\n\t\t\t\to.mirrorContainer.appendChild( shared.mirror );\n\t\t\t\tregEvent( _docElm, 'on', 'mousemove', drag );\n\t\t\t\taddClass( _doc.body, o.classes.unselectable );\n\t\t\t\tregEvent( shared.mirror, 'on', 'wheel', scrollContainer );\n\t\t\t\tif ( o.scope ) {\n\t\t\t\t\to.scope.$emit( o.eventNames.dragularcloned, shared.mirror, shared.sourceItem );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction end() {\n\t\t\t\tif ( !drake.dragging || !shared.item ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tdrop( shared.item, getParent( shared.item ) );\n\t\t\t}\n\n\t\t\tfunction ungrab() {\n\t\t\t\tshared.grabbed = false;\n\t\t\t\teventualMovements( 'remove' );\n\t\t\t\tmovements( 'remove' );\n\t\t\t}\n\n\n\t\t\t// ====================================================================================================================================\n\t\t\t// Drag stage: ------------------------------------------------------------------------------------------------------------------------\n\t\t\t// ====================================================================================================================================\n\n\n\t\t\tfunction drag( e ) { // watch performance!! - function is running each mousemove!\n\t\t\t\tif ( !shared.mirror ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif ( e.originalEvent ) {\n\t\t\t\t\te = e.originalEvent; // jQuery environment\n\t\t\t\t}\n\n\t\t\t\t// update coordinates\n\t\t\t\tshared.clientX = getCoord( 'clientX', e );\n\t\t\t\tshared.clientY = getCoord( 'clientY', e );\n\n\t\t\t\t// count mirror coordinates\n\t\t\t\tvar x = shared.clientX - shared.offsetX,\n\t\t\t\t\ty = shared.clientY - shared.offsetY,\n\t\t\t\t\tpageX,\n\t\t\t\t\tpageY,\n\t\t\t\t\toffsetBox;\n\n\t\t\t\t// fill extra properties if boundingBox is used\n\t\t\t\tif ( o.boundingBox ) {\n\t\t\t\t\tpageX = getCoord( 'pageX', e );\n\t\t\t\t\tpageY = getCoord( 'pageY', e );\n\t\t\t\t\toffsetBox = getOffset( o.boundingBox );\n\t\t\t\t}\n\n\t\t\t\tif ( !o.lockY ) {\n\t\t\t\t\tif ( !o.boundingBox || (pageX > offsetBox.left + shared.offsetX && pageX < offsetBox.right + shared.offsetXr) ) {\n\t\t\t\t\t\tshared.mirror.style.left = x + 'px';\n\t\t\t\t\t} else if ( o.boundingBox ) { // check again in case user scrolled the view\n\t\t\t\t\t\tif ( pageX < offsetBox.left + shared.offsetX ) {\n\t\t\t\t\t\t\tshared.mirror.style.left = shared.clientX - (pageX - offsetBox.left) + 'px';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tshared.mirror.style.left = shared.clientX - shared.mirrorWidth - (pageX - offsetBox.right) + 'px';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ( !o.lockX ) {\n\t\t\t\t\tif ( !o.boundingBox || (pageY > offsetBox.top + shared.offsetY && pageY < offsetBox.bottom + shared.offsetYb) ) {\n\t\t\t\t\t\tshared.mirror.style.top = y + 'px';\n\t\t\t\t\t} else if ( o.boundingBox ) { // check again in case user scrolled the view\n\t\t\t\t\t\tif ( pageY < offsetBox.top + shared.offsetY ) {\n\t\t\t\t\t\t\tshared.mirror.style.top = shared.clientY - (pageY - offsetBox.top) + 'px';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tshared.mirror.style.top = shared.clientY - shared.mirrorHeight - (pageY - offsetBox.bottom) + 'px';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tvar elementBehindCursor = getElementBehindPoint( shared.mirror, shared.clientX, shared.clientY ),\n\t\t\t\t\tdropTarget = findDropTarget( elementBehindCursor, shared.clientX, shared.clientY ),\n\t\t\t\t\tchanged = dropTarget !== shared.lastDropTarget;\n\n\t\t\t\tif ( elementBehindCursor !== shared.lastElementBehindCursor ) {\n\t\t\t\t\tfireEvent( elementBehindCursor, shared.dragOverEvents.dragularenter, !!dropTarget );\n\t\t\t\t\tif ( shared.lastElementBehindCursor ) {\n\t\t\t\t\t\tfireEvent( shared.lastElementBehindCursor, shared.dragOverEvents.dragularleave, elementBehindCursor );\n\t\t\t\t\t}\n\t\t\t\t\tshared.lastElementBehindCursor = elementBehindCursor;\n\t\t\t\t}\n\n\t\t\t\tif ( changed ) {\n\t\t\t\t\tif ( shared.lastDropTarget ) {\n\t\t\t\t\t\tmoved( 'out' );\n\t\t\t\t\t}\n\t\t\t\t\tshared.lastDropTarget = dropTarget;\n\t\t\t\t\tmoved( 'over' );\n\t\t\t\t}\n\n\t\t\t\t// do not copy in same container\n\t\t\t\tif ( dropTarget === shared.source && shared.copy && !g( o.copySortSource ) ) {\n\t\t\t\t\tif ( getParent( shared.item ) ) {\n\t\t\t\t\t\tshared.item.parentNode.removeChild( shared.item );\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar reference,\n\t\t\t\t\timmediate = getImmediateChild( dropTarget, elementBehindCursor );\n\n\t\t\t\tif ( immediate !== null ) {\n\t\t\t\t\treference = getReference( dropTarget, immediate, shared.clientX, shared.clientY );\n\t\t\t\t} else if ( g( o.revertOnSpill ) === true && !shared.copy ) {\n\t\t\t\t\t// the case that mirror is not over valid target and reverting is on and copy is off\n\t\t\t\t\treference = shared.initialSibling;\n\t\t\t\t\tdropTarget = shared.source;\n\t\t\t\t} else {\n\t\t\t\t\t// the case that mirror is not over valid target and removing is on or copy is on\n\t\t\t\t\tif ( shared.copy && getParent( shared.item ) ) {\n\t\t\t\t\t\t// remove item or copy of item\n\t\t\t\t\t\tshared.item.parentNode.removeChild( shared.item );\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( reference === null ||\n\t\t\t\t\treference !== shared.item &&\n\t\t\t\t\treference !== nextEl( shared.item ) &&\n\t\t\t\t\treference !== shared.currentSibling ) {\n\t\t\t\t\t// moving item/copy to new container from previous one\n\t\t\t\t\tshared.currentSibling = reference;\n\n\t\t\t\t\tdropTarget.insertBefore( shared.item, reference ); // if reference is null item is inserted at the end\n\n\t\t\t\t\tif ( o.scope ) {\n\t\t\t\t\t\to.scope.$emit( o.eventNames.dragularshadow, shared.item, dropTarget, e );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfunction moved( type ) {\n\t\t\t\t\tif ( o.scope ) {\n\t\t\t\t\t\tnotify( o.scope );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( shared.targetCtx && shared.targetCtx.o.scope && shared.targetCtx.o.scope !== o.scope ) {\n\t\t\t\t\t\tnotify( shared.targetCtx.o.scope );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( g( o.removeOnSpill ) === true ) {\n\t\t\t\t\t\ttype === 'over' ? spillOver() : spillOut();\n\t\t\t\t\t}\t\n\n\t\t\t\t\tfunction notify( scope ){\n\t\t\t\t\t\tscope.$emit( o.eventNames[ 'dragular' + type ], shared.item, shared.lastDropTarget, shared.source, e );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// find valid drop container\n\t\t\tfunction findDropTarget( elementBehindCursor, clientX, clientY ) { // watch performance!! - running each move!\n\t\t\t\tvar target = elementBehindCursor,\n\t\t\t\t\ttargetCtx = null;\n\n\t\t\t\twhile ( target && !accepted() ) {\n\t\t\t\t\ttarget = getParent( target );\n\t\t\t\t}\n\n\t\t\t\t// bugfix #148 model not updated on spill\n\t\t\t\t// added target condition to fix #161\n\t\t\t\tif ( target && targetCtx ){\n\t\t\t\t\tshared.targetCtx = targetCtx;\n\t\t\t\t}\n\n\t\t\t\treturn target;\n\n\t\t\t\tfunction accepted() {\n\n\t\t\t\t\tif ( !isContainer( target ) ) { // is not droppable?\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\tvar immediate = getImmediateChild( target, elementBehindCursor ),\n\t\t\t\t\t\treference = getReference( target, immediate, clientX, clientY ),\n\t\t\t\t\t\tinitial = isInitialPlacement( target, reference ),\n\t\t\t\t\t\ti = o.nameSpace.length,\n\t\t\t\t\t\tnameSpace;\n\n\t\t\t\t\twhile ( i-- ) { // for each namespace\n\t\t\t\t\t\tnameSpace = o.nameSpace[ i ];\n\t\t\t\t\t\tif ( shared.containers[ nameSpace ].indexOf( target ) !== -1 ) {\n\t\t\t\t\t\t\ttargetCtx = getTargetCtx( nameSpace );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// shared.target must be actual (used for scroll functionality)\n\t\t\t\t\tshared.target = target;\n\n\t\t\t\t\tif ( initial ) {\n\n\t\t\t\t\t\treturn true; // accepts = true;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// try to find target in default set of containers\n\t\t\t\t\t\tif ( !targetCtx ) {\n\t\t\t\t\t\t\ttargetCtx = getTargetCtx( 'dragularCommon' );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// if found and containersModel is dynamic, retrieve model\n\t\t\t\t\t\tif ( targetCtx && _isFunction( targetCtx.o.containersModel ) ) {\n\t\t\t\t\t\t\t// fix targetCtx.m(odel) for dynamic containersModel\n\t\t\t\t\t\t\ttargetCtx.m = getContainersModel( targetCtx.o )[ getContainers( targetCtx.o ).indexOf( target ) ];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( targetCtx && // target container is defined via service or directive\n\t\t\t\t\t\t\ttargetCtx.o.accepts && !targetCtx.o.accepts( shared.item, target, shared.source, reference, shared.sourceModel, shared.initialIndex ) ) {\n\n\t\t\t\t\t\t\treturn false;\n\n\t\t\t\t\t\t} else if ( o.isContainer && // target container is recognized via o.isContainer\n\t\t\t\t\t\t\to.isContainerAccepts && !o.isContainerAccepts( shared.item, target, shared.source, reference, shared.sourceModel, shared.initialIndex ) ) {\n\n\t\t\t\t\t\t\treturn false;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn !o.canBeAccepted || o.canBeAccepted( shared.item, target, shared.source, reference, shared.sourceModel, shared.initialIndex );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tfunction getTargetCtx( nameSpace ) {\n\t\t\t\t\treturn shared.containersCtx[ nameSpace ] && shared.containersCtx[ nameSpace ][ shared.containers[ nameSpace ].indexOf( target ) ];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction spillOver() {\n\t\t\t\trmClass( shared.item, o.classes.hide );\n\t\t\t}\n\n\t\t\tfunction spillOut() {\n\t\t\t\tif ( drake.dragging ) {\n\t\t\t\t\taddClass( shared.item, o.classes.hide );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// is item currently placed in original container and original position?\n\t\t\tfunction isInitialPlacement( target, s ) { // watch performance - running each move several times!\n\t\t\t\tvar sibling = s !== undefined ? s : (shared.mirror ? shared.currentSibling : nextEl( shared.item ));\n\t\t\t\treturn target === shared.source && sibling === shared.initialSibling;\n\t\t\t}\n\n\t\t\tfunction getImmediateChild( dropTarget, target ) { // watch performance - running each move several times!\n\t\t\t\tvar immediate = target;\n\t\t\t\twhile ( immediate !== dropTarget && getParent( immediate ) !== dropTarget ) {\n\t\t\t\t\timmediate = getParent( immediate );\n\t\t\t\t}\n\t\t\t\tif ( immediate === _docElm ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\treturn immediate;\n\t\t\t}\n\n\t\t\tfunction getReference( dropTarget, target, x, y ) { // watch performance - running each move several times!\n\t\t\t\tvar horizontal = o.direction === 'horizontal';\n\t\t\t\treturn target !== dropTarget ? inside() : outside();\n\n\t\t\t\tfunction outside() { // slower, but able to figure out any position\n\t\t\t\t\tvar len = dropTarget.children.length,\n\t\t\t\t\t\ti, el, rect;\n\t\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\t\tel = dropTarget.children[ i ];\n\t\t\t\t\t\trect = el.getBoundingClientRect();\n\t\t\t\t\t\tif ( horizontal && rect.left > x ) {\n\t\t\t\t\t\t\treturn el;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( !horizontal && rect.top > y ) {\n\t\t\t\t\t\t\treturn el;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\tfunction inside() { // faster, but only available if dropped inside a child element\n\t\t\t\t\tvar rect = target.getBoundingClientRect();\n\t\t\t\t\tif ( horizontal ) {\n\t\t\t\t\t\treturn resolve( x > rect.left + getRectWidth( rect ) / 2 );\n\t\t\t\t\t}\n\t\t\t\t\treturn resolve( y > rect.top + getRectHeight( rect ) / 2 );\n\t\t\t\t}\n\n\t\t\t\tfunction resolve( after ) {\n\t\t\t\t\treturn after ? nextEl( target ) : target;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction getElementBehindPoint( point, x, y ) { // watch performance!! - function is running each mousemove!\n\t\t\t\tvar p = point || {},\n\t\t\t\t\tstate = p.className,\n\t\t\t\t\tel;\n\t\t\t\tp.className += ' ' + o.classes.hide;\n\t\t\t\tel = _doc.elementFromPoint( x, y );\n\t\t\t\tp.className = state;\n\t\t\t\treturn el;\n\t\t\t}\n\n\t\t\tfunction isContainer( el ) {\n\n\t\t\t\tif ( !el ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tvar i = o.nameSpace.length;\n\t\t\t\twhile ( i-- ) {\n\n\t\t\t\t\tif ( shared.containers[ o.nameSpace[ i ] ].indexOf( el ) !== -1 ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( o.isContainer( el ) ) {\n\n\t\t\t\t\tshared.tempModel = o.isContainerModel( el );\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\n\t\t\t\t\tshared.tempModel = null;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tfunction getContainers( opt ) {\n\n\t\t\t\treturn _getContainers( 'containers', opt );\n\t\t\t}\n\n\t\t\tfunction getContainersModel( opt ) {\n\n\t\t\t\treturn _getContainers( 'containersModel', opt, true );\n\t\t\t}\n\n\t\t\tfunction _getContainers( containersType, opt, to2d ) {\n\n\t\t\t\treturn _isFunction( opt[ containersType ] ) ? sanitizeContainers(\n\t\t\t\t\topt[ containersType ](\n\t\t\t\t\t\t(opt === o ? drake : null),\n\t\t\t\t\t\tshared\n\t\t\t\t\t),\n\t\t\t\t\tto2d,\n\t\t\t\t\topt.scope\n\t\t\t\t) : opt[ containersType ];\n\t\t\t}\n\n\t\t\tfunction cancel( revert ) {\n\t\t\t\tif ( !drake.dragging ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tvar reverts = arguments.length > 0 ? revert : g( o.revertOnSpill ),\n\t\t\t\t\tparent = getParent( shared.item );\n\n\t\t\t\tvar initial = isInitialPlacement( parent );\n\t\t\t\tif ( !initial && !shared.copy && reverts ) {\n\t\t\t\t\tshared.source.insertBefore( shared.item, shared.initialSibling );\n\t\t\t\t}\n\t\t\t\tif ( shared.sourceModel && !shared.copy && !reverts ) {\n\t\t\t\t\tdrop( shared.item, parent );\n\t\t\t\t} else if ( o.scope ) {\n\t\t\t\t\tif ( initial || reverts ) {\n\t\t\t\t\t\to.scope.$emit( o.eventNames.dragularcancel, shared.item, shared.source, shared.sourceModel, shared.initialIndex );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( !shared.sourceModel || shared.copy || reverts || initial ) {\n\t\t\t\t\tcleanup();\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\t// ====================================================================================================================================\n\t\t\t// Release stage: ------------------------------------------------------------------------------------------------------------------------\n\t\t\t// ====================================================================================================================================\n\n\n\t\t\tfunction release( e ) {\n\n\t\t\t\tungrab();\n\t\t\t\tif ( !drake.dragging ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif ( e.originalEvent ) {\n\t\t\t\t\te = e.originalEvent; // jQuery enviroment\n\t\t\t\t}\n\n\t\t\t\tshared.clientX = getCoord( 'clientX', e );\n\t\t\t\tshared.clientY = getCoord( 'clientY', e );\n\n\t\t\t\tvar elementBehindCursor = getElementBehindPoint( shared.mirror, shared.clientX, shared.clientY ),\n\t\t\t\t\tdropTarget = findDropTarget( elementBehindCursor, shared.clientX, shared.clientY );\n\n\t\t\t\tif ( dropTarget && ((shared.copy && g( o.copySortSource )) || (!shared.copy || dropTarget !== shared.source)) ) {\n\t\t\t\t\t// found valid target and (is not copy case or target is not initial container)\n\t\t\t\t\tdrop( shared.item, dropTarget );\n\t\t\t\t} else if ( g( o.removeOnSpill ) ) {\n\t\t\t\t\tremove();\n\t\t\t\t} else {\n\t\t\t\t\tcancel();\n\t\t\t\t}\n\n\t\t\t\t// after release there is no container hovered\n\t\t\t\tshared.target = null;\n\n\t\t\t\tif ( shared.lastElementBehindCursor ) {\n\t\t\t\t\tfireEvent( shared.lastElementBehindCursor, shared.dragOverEvents.dragularrelease, elementBehindCursor );\n\t\t\t\t}\n\n\t\t\t\tif ( o.scope ) {\n\t\t\t\t\to.scope.$emit( o.eventNames.dragularrelease, shared.item, shared.source, e );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction drop( item, target ) {\n\t\t\t\tif ( !item ) { // https://github.com/luckylooke/dragular/issues/102\n\t\t\t\t\tcleanup();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tvar sourceItem = shared.sourceItem,\n\t\t\t\t\tcurrentSibling = shared.currentSibling,\n\t\t\t\t\tdropIndex = domIndexOf( item, target );\n\n\t\t\t\tif ( shared.copy && target === shared.source && getParent( item ) && g( o.copySortSource ) ) {\n\t\t\t\t\titem.parentNode.removeChild( shared.sourceItem );\n\t\t\t\t}\n\n\t\t\t\tif ( shared.sourceModel && !isInitialPlacement( target ) ) {\n\t\t\t\t\tif ( shared.targetCtx && shared.targetCtx.fm ) { // target has filtered model\n\t\t\t\t\t\t// convert index from index-in-filteredModel to index-in-model\n\t\t\t\t\t\tdropIndex = shared.targetCtx.m.indexOf( shared.targetCtx.fm[ dropIndex ] );\n\t\t\t\t\t}\n\t\t\t\t\tif ( shared.sourceFilteredModel ) { // source has filtered model\n\t\t\t\t\t\t// convert index from index-in-filteredModel to index-in-model\n\t\t\t\t\t\tshared.initialIndex = shared.sourceModel.indexOf( shared.sourceFilteredModel[ shared.initialIndex ] );\n\t\t\t\t\t}\n\t\t\t\t\t$rootScope.$applyAsync( function applyDrop() {\n\t\t\t\t\t\tif ( !shared.sourceModel ) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( target === shared.source ) {\n\t\t\t\t\t\t\tshared.sourceModel.splice( dropIndex, 0, shared.sourceModel.splice( shared.initialIndex, 1 )[ 0 ] );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tshared.dropElmModel = shared.copy && !o.dontCopyModel ? angular.copy( shared.sourceModel[ shared.initialIndex ] ) : shared.sourceModel[ shared.initialIndex ];\n\n\t\t\t\t\t\t\tif ( !shared.tempModel ) {\n\t\t\t\t\t\t\t\tshared.targetModel = ( shared.targetCtx && shared.targetCtx.m ) || shared.sourceModel;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tshared.targetModel = shared.tempModel;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\titem.parentNode.removeChild( item ); // element must be removed for ngRepeat to apply correctly\n\n\t\t\t\t\t\t\tif ( !shared.copy ) {\n\t\t\t\t\t\t\t\tshared.sourceModel.splice( shared.initialIndex, 1 );\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( shared.targetModel ) {\n\t\t\t\t\t\t\t\tshared.targetModel.splice( dropIndex, 0, shared.dropElmModel );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// removing element, as protection against duplicates, angular ng-repeat will create new item according to model\n\t\t\t\t\t\tif ( getParent( item ) ) {\n\t\t\t\t\t\t\titem.parentNode.removeChild( item );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tafterDrop();\n\t\t\t\t\t} );\n\t\t\t\t} else {\n\t\t\t\t\tafterDrop();\n\t\t\t\t}\n\n\t\t\t\tfunction afterDrop() {\n\n\t\t\t\t\t// in nested containers case, new containers doesnt have registered mousedown\n\t\t\t\t\tgetContainers( o ).forEach( function readdMouseDown( container ) {\n\t\t\t\t\t\tregEvent( container, 'off', 'mousedown', grab );\n\t\t\t\t\t\tregEvent( container, 'on', 'mousedown', grab );\n\t\t\t\t\t} );\n\n\t\t\t\t\tif ( o.compileItemOnDrop ) {\n\t\t\t\t\t\tvar scope = angular.element( target ).scope ? angular.element( target ).scope() : o.scope;\n\t\t\t\t\t\tif ( scope ) {\n\t\t\t\t\t\t\tscope.$applyAsync( function () {\n\t\t\t\t\t\t\t\tvar content = $compile( shared.copy ? sourceItem.cloneNode( true ) : sourceItem )( scope );\n\t\t\t\t\t\t\t\tif ( item.parentNode === target ) {\n\t\t\t\t\t\t\t\t\ttarget.removeChild( item );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\ttarget.insertBefore( content[ 0 ], currentSibling );\n\t\t\t\t\t\t\t\tcleanup();\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( o.scope ) {\n\t\t\t\t\t\tnotify( o.scope );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( shared.targetCtx && shared.targetCtx.o.scope && shared.targetCtx.o.scope !== o.scope ) {\n\t\t\t\t\t\tnotify( shared.targetCtx.o.scope );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( !o.compileItemOnDrop ) {\n\t\t\t\t\t\tcleanup();\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction notify( scope ){\n\t\t\t\t\t\tif ( isInitialPlacement( target ) ) {\n\t\t\t\t\t\t\tscope.$emit( o.eventNames.dragularcancel, item, shared.source, shared.sourceModel, shared.initialIndex );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tscope.$emit( o.eventNames.dragulardrop, item, target, shared.source, shared.sourceModel, shared.initialIndex, shared.targetModel, dropIndex );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction remove() {\n\t\t\t\tif ( !drake.dragging ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tvar parent = getParent( shared.item );\n\n\t\t\t\tif ( parent ) {\n\t\t\t\t\tparent.removeChild( shared.item );\n\t\t\t\t}\n\n\t\t\t\tif ( shared.sourceModel ) {\n\t\t\t\t\t$rootScope.$applyAsync( function removeModel() {\n\t\t\t\t\t\tshared.sourceModel.splice( shared.initialIndex, 1 );\n\t\t\t\t\t\tcleanup();\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tif ( o.scope ) {\n\t\t\t\t\to.scope.$emit( shared.copy ? o.eventNames.dragularcancel : o.eventNames.dragularremove, shared.item, parent, shared.sourceModel, shared.initialIndex );\n\t\t\t\t}\n\t\t\t\tif ( !shared.sourceModel ) {\n\t\t\t\t\tcleanup();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction cleanup() {\n\t\t\t\tungrab();\n\t\t\t\tremoveMirrorImage();\n\n\t\t\t\tif ( shared.item ) {\n\t\t\t\t\trmClass( shared.item, o.classes.transit );\n\t\t\t\t}\n\n\t\t\t\tdrake.dragging = false;\n\n\t\t\t\tif ( g( o.removeOnSpill ) === true ) {\n\t\t\t\t\tspillOut();\n\t\t\t\t}\n\n\t\t\t\tif ( o.scope ) {\n\t\t\t\t\tif ( shared.lastDropTarget ) {\n\t\t\t\t\t\to.scope.$emit( o.eventNames.dragularout, shared.item, shared.lastDropTarget, shared.source );\n\t\t\t\t\t}\n\t\t\t\t\to.scope.$emit( o.eventNames.dragulardragend, shared.item );\n\t\t\t\t}\n\n\t\t\t\tshared.source = shared.item = shared.sourceItem = shared.initialSibling = shared.currentSibling = shared.sourceModel = null;\n\t\t\t\tshared.initialIndex = shared.currentIndex = shared.lastDropTarget = shared.tempModel = shared.targetModel = null;\n\t\t\t\tshared.dropElmModel = shared.targetCtx = shared.copy = shared.moveX = shared.moveY = null;\n\t\t\t}\n\n\t\t\tfunction destroy() {\n\n\t\t\t\tregisterEvents( true );\n\t\t\t\tremoveContainers( o.containers );\n\t\t\t\trelease( {} );\n\t\t\t}\n\n\t\t\tfunction removeContainers( all ) {\n\n\t\t\t\t$rootScope.$applyAsync( function applyDestroyed() {\n\n\t\t\t\t\tvar changes = _isArray( all ) ? all : makeArray( all );\n\t\t\t\t\tchanges.forEach( function forEachContainer( container ) {\n\n\t\t\t\t\t\tangular.forEach( o.nameSpace, function forEachNs( nameSpace ) {\n\n\t\t\t\t\t\t\tvar index;\n\t\t\t\t\t\t\tindex = shared.containers[ nameSpace ].indexOf( container );\n\t\t\t\t\t\t\tshared.containers[ nameSpace ].splice( index, 1 );\n\t\t\t\t\t\t\tshared.containersCtx[ nameSpace ].splice( index, 1 );\n\t\t\t\t\t\t} );\n\t\t\t\t\t} );\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tfunction scrollContainer( e ) {\n\t\t\t\tif ( shared.target ) {\n\t\t\t\t\tif ( e.originalEvent ) {\n\t\t\t\t\t\te = e.originalEvent; // jQuery enviroment\n\t\t\t\t\t}\n\t\t\t\t\tvar before = shared.target.scrollTop;\n\t\t\t\t\tshared.target.scrollTop += e.deltaY;\n\t\t\t\t\t// block scroll of the document when container can be scrolled\n\t\t\t\t\tif ( before !== shared.target.scrollTop ) {\n\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction removeMirrorImage() {\n\t\t\t\tif ( shared.mirror ) {\n\t\t\t\t\trmClass( _doc.body, o.classes.unselectable );\n\t\t\t\t\tregEvent( _docElm, 'off', 'mousemove', drag );\n\t\t\t\t\tregEvent( shared.mirror, 'off', 'wheel', scrollContainer );\n\t\t\t\t\tif ( getParent( shared.mirror ) ) {\n\t\t\t\t\t\tshared.mirror.parentNode.removeChild( shared.mirror );\n\t\t\t\t\t}\n\t\t\t\t\tshared.mirror = null;\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\t// ====================================================================================================================================\n\t\t\t// Other fns: -------------------------------------------------------------------------------------------------------------------------\n\t\t\t// ====================================================================================================================================\n\n\n\t\t\tfunction depSanitize( containersModel ) {\n\t\t\t\tconsole.warn( 'Deprecated method drake.sanitizeContainersModel! Will be removed in next major release! Please use sanitizeContainers instead.' );\n\t\t\t\tsanitizeContainers( containersModel, true, o.scope );\n\t\t\t}\n\n\t\t} // end of service\n\n\t\t/****************************************************************************************************************************/\n\t\t/****************************************************************************************************************************/\n\t\t/****************************************************************************************************************************/\n\n\t\t// HELPERS FUNCTIONS:\n\n\t\tfunction sanitizeContainers( containers, to2d, scope ) {\n\n\t\t\tif ( _isFunction( containers ) ) {\n\n\t\t\t\treturn containers;\n\t\t\t}\n\t\t\telse if ( _isArray( containers ) ) {\n\n\t\t\t\tif ( to2d ) {\n\t\t\t\t\t// |-------- is 2D array? -----------|\n\t\t\t\t\treturn _isArray( containers[ 0 ] ) ? containers : [ containers ];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn containers;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ( typeof containers === 'string' && scope ) {\n\n\t\t\t\tvar evaluated = scope.$eval( containers );\n\n\t\t\t\tif ( _isFunction( evaluated ) ) {\n\t\t\t\t\treturn evaluated;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn function () {\n\t\t\t\t\t\treturn scope.$eval( containers );\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ( containers ) {\n\n\t\t\t\treturn makeArray( containers );\n\t\t\t}\n\n\t\t\treturn [];\n\t\t}\n\n\t\tfunction regEvent( el, op, type, fn ) {\n\t\t\tvar touch = {\n\t\t\t\t\tmouseup: 'touchend',\n\t\t\t\t\tmousedown: 'touchstart',\n\t\t\t\t\tmousemove: 'touchmove'\n\t\t\t\t},\n\t\t\t\tpointers = {\n\t\t\t\t\tmouseup: 'pointerup',\n\t\t\t\t\tmousedown: 'pointerdown',\n\t\t\t\t\tmousemove: 'pointermove'\n\t\t\t\t},\n\t\t\t\tmicrosoft = {\n\t\t\t\t\tmouseup: 'MSPointerUp',\n\t\t\t\t\tmousedown: 'MSPointerDown',\n\t\t\t\t\tmousemove: 'MSPointerMove'\n\t\t\t\t},\n\t\t\t\t$el = angular.element( el );\n\n\t\t\tif ( el.addEventListener ) {\n\n\t\t\t\tvar opConvert = { on: 'addEventListener', off: 'removeEventListener' };\n\t\t\t\tel[ opConvert[ op ] ]( type, fn, { passive: false } );\n\t\t\t\tel[ opConvert[ op ] ]( touch[ type ], fn, { passive: false } );\n\n\t\t\t} else {\n\n\t\t\t\tif ( typeof navigator !== 'undefined' && navigator.pointerEnabled && pointers[ type ] ) {\n\t\t\t\t\t$el[ op ]( pointers[ type ], fn );\n\t\t\t\t} else if ( typeof navigator !== 'undefined' && navigator.msPointerEnabled && microsoft[ type ] ) {\n\t\t\t\t\t$el[ op ]( microsoft[ type ], fn );\n\t\t\t\t} else if ( touch[ type ] ) {\n\t\t\t\t\t$el[ op ]( touch[ type ], fn );\n\t\t\t\t}\n\t\t\t\t$el[ op ]( type, fn );\n\n\t\t\t}\n\t\t}\n\n\t\tfunction never() {\n\t\t\treturn false;\n\t\t}\n\n\t\tfunction always() {\n\t\t\treturn true;\n\t\t}\n\n\t\t// make array from array-like objects or from single element (based on bevacqua/atoa)\n\t\tfunction makeArray( all, startIndex ) {\n\t\t\tif ( _isArray( all ) ) {\n\t\t\t\treturn all;\n\t\t\t}\n\t\t\tif ( all.length ) { // is array-like\n\t\t\t\treturn Array.prototype.slice.call( all, startIndex ); // convert to vanilla js array\n\t\t\t} else { // is one element\n\t\t\t\treturn [ all ];\n\t\t\t}\n\t\t}\n\n\t\tfunction whichMouseButton( e ) {\n\t\t\tif ( e.touches ) {\n\t\t\t\treturn e.touches.length;\n\t\t\t}\n\t\t\tif ( e.originalEvent && e.originalEvent.touches ) {\n\t\t\t\treturn e.originalEvent.touches.length;\n\t\t\t}\n\t\t\tif ( e.which !== void 0 && e.which !== 0 ) {\n\t\t\t\treturn e.which;\n\t\t\t} // github.com/bevacqua/dragula/issues/261\n\t\t\tif ( e.buttons !== undefined ) {\n\t\t\t\treturn e.buttons;\n\t\t\t}\n\t\t\tvar button = e.button;\n\t\t\tif ( button !== undefined ) { // see github.com/jquery/jquery/blob/99e8ff1baa7ae341e94bb89c3e84570c7c3ad9ea/src/event.js#L573-L575\n\t\t\t\treturn button & 1 ? 1 : button & 2 ? 3 : (button & 4 ? 2 : 0);\n\t\t\t}\n\t\t}\n\n\t\tfunction preventGrabbed( e ) {\n\t\t\tif ( e.originalEvent ) {\n\t\t\t\te = e.originalEvent; // jQuery enviroment\n\t\t\t}\n\t\t\tif ( shared.grabbed ) {\n\t\t\t\te.preventDefault();\n\t\t\t}\n\t\t}\n\n\t\tfunction getScroll( scrollProp, offsetProp ) {\n\t\t\tif ( typeof window[ offsetProp ] !== 'undefined' ) {\n\t\t\t\treturn window[ offsetProp ];\n\t\t\t}\n\t\t\tif ( _docElm.clientHeight ) {\n\t\t\t\treturn _docElm[ scrollProp ];\n\t\t\t}\n\t\t\treturn _doc.body[ scrollProp ];\n\t\t}\n\n\t\tfunction getOffset( el ) { // watch performance!! - function is running each mousemove!\n\t\t\tvar rect = el.getBoundingClientRect(),\n\t\t\t\tscrollTop = getScroll( 'scrollTop', 'pageYOffset' ),\n\t\t\t\tscrollLeft = getScroll( 'scrollLeft', 'pageXOffset' );\n\t\t\treturn {\n\t\t\t\tleft: rect.left + scrollLeft,\n\t\t\t\tright: rect.right + scrollLeft,\n\t\t\t\ttop: rect.top + scrollTop,\n\t\t\t\tbottom: rect.bottom + scrollTop\n\t\t\t};\n\t\t}\n\n\t\tfunction getRectWidth( rect ) {\n\t\t\treturn rect.width || (rect.right - rect.left);\n\t\t}\n\n\t\tfunction getRectHeight( rect ) {\n\t\t\treturn rect.height || (rect.bottom - rect.top);\n\t\t}\n\n\t\tfunction getEmptyArray() {\n\t\t\treturn [];\n\t\t}\n\n\t\tfunction nextEl( el ) {\n\t\t\tif ( !el ) { // https://github.com/luckylooke/dragular/issues/102\n\t\t\t\treturn;\n\t\t\t}\n\t\t\treturn el.nextElementSibling || manually();\n\n\t\t\tfunction manually() {\n\t\t\t\tvar sibling = el;\n\t\t\t\tdo {\n\t\t\t\t\tsibling = sibling.nextSibling;\n\t\t\t\t} while ( sibling && sibling.nodeType !== 1 );\n\t\t\t\treturn sibling;\n\t\t\t}\n\t\t}\n\n\t\t//Cannot use angular.isElement because we need to check plain dom element, no jQlite wrapped\n\t\tfunction isElement( obj ) {\n\t\t\treturn (\n\t\t\t\ttypeof HTMLElement === 'object' ? obj instanceof HTMLElement : //DOM2\n\t\t\t\t\tobj && typeof obj === 'object' && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === 'string'\n\t\t\t);\n\t\t}\n\n\t\tfunction lookupClass( className ) {\n\t\t\tvar cached = shared.classesCache[ className ];\n\t\t\tif ( cached ) {\n\t\t\t\tcached.lastIndex = 0;\n\t\t\t} else {\n\t\t\t\tshared.classesCache[ className ] = cached = new RegExp( '(?:^|\\\\s)' + className + '(?:\\\\s|$)', 'g' );\n\t\t\t}\n\t\t\treturn cached;\n\t\t}\n\n\t\tfunction addClass( el, className ) {\n\t\t\tvar current = el.className;\n\t\t\tif ( !current.length ) {\n\t\t\t\tel.className = className;\n\t\t\t} else if ( !lookupClass( className ).test( current ) ) {\n\t\t\t\tel.className += ' ' + className;\n\t\t\t}\n\t\t}\n\n\t\tfunction rmClass( el, className ) {\n\t\t\tel.className = el.className.replace( lookupClass( className ), ' ' ).trim();\n\t\t}\n\n\t\tfunction getEventHost( e ) {\n\t\t\t// on touchend event, we have to use `e.changedTouches`\n\t\t\t// see http://stackoverflow.com/questions/7192563/touchend-event-properties\n\t\t\t// see https://github.com/bevacqua/dragula/issues/34\n\t\t\tif ( e.targetTouches && e.targetTouches.length ) {\n\t\t\t\treturn e.targetTouches[ 0 ];\n\t\t\t}\n\t\t\tif ( e.changedTouches && e.changedTouches.length ) {\n\t\t\t\treturn e.changedTouches[ 0 ];\n\t\t\t}\n\t\t\treturn e;\n\t\t}\n\n\t\tfunction getCoord( coord, e ) { // watch performance - running each move several times!\n\t\t\tvar host = getEventHost( e );\n\t\t\tvar missMap = {\n\t\t\t\tpageX: 'clientX', // IE8\n\t\t\t\tpageY: 'clientY' // IE8\n\t\t\t};\n\t\t\tif ( coord in missMap && !(coord in host) && missMap[ coord ] in host ) {\n\t\t\t\tcoord = missMap[ coord ];\n\t\t\t}\n\n\t\t\t// Adding support for touch events, as they are not functional in the original\n\t\t\tif ( !host.type || host.type.indexOf( 'touch' ) < 0 ) {\n\t\t\t\treturn host[ coord ];\n\t\t\t} else {\n\t\t\t\tif ( host.type.indexOf( 'end' ) === -1 ) {\n\t\t\t\t\t// No clientX or clientY in a touch event\n\t\t\t\t\treturn host.originalEvent.touches[ 0 ][ coord.replace( 'client', 'page' ) ];\n\t\t\t\t}\n\t\t\t\t// Nothing should happen for touchend\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfunction getParent( el ) { // watch performance!! - function is running each mousemove!\n\t\t\treturn el.parentNode === document ? null : el.parentNode;\n\t\t}\n\n\t\tfunction isInput( el ) {\n\t\t\treturn el.tagName === 'INPUT' || el.tagName === 'TEXTAREA' || el.tagName === 'SELECT' || isEditable( el );\n\t\t}\n\n\t\tfunction isEditable( el ) {\n\t\t\tif ( !el ) {\n\t\t\t\treturn false;\n\t\t\t} // no parents were editable\n\t\t\tif ( el.contentEditable === 'false' ) {\n\t\t\t\treturn false;\n\t\t\t} // stop the lookup\n\t\t\tif ( el.contentEditable === 'true' ) {\n\t\t\t\treturn true;\n\t\t\t} // found a contentEditable element in the chain\n\t\t\treturn isEditable( getParent( el ) ); // contentEditable is set to 'inherit'\n\t\t}\n\n\t\tfunction domIndexOf( child, parent ) {\n\t\t\treturn Array.prototype.indexOf.call( angular.element( parent ).children(), child );\n\t\t}\n\n\t\tfunction fireEvent( target, e, extra ) { // watch performance!! - function is running each mousemove!\n\t\t\tif ( !target ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tshared.extra = extra;\n\t\t\tif ( target.dispatchEvent ) {\n\t\t\t\ttarget.dispatchEvent( e );\n\t\t\t} else {\n\t\t\t\ttarget.fireEvent( 'on' + e.eventType, e );\n\t\t\t}\n\t\t}\n\n\t\tfunction getBool( prop, args, context ) {\n\t\t\tif ( _isFunction( prop ) ) {\n\t\t\t\treturn !!prop.apply( context || this, args || shared );\n\t\t\t} else {\n\t\t\t\treturn !!prop;\n\t\t\t}\n\t\t}\n\n\t};\n\n\tdragularService.$inject = [ '$rootScope', '$compile' ];\n\n\tmodule.exports = dragularService;\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar examplesRouter = function ($stateProvider, $urlRouterProvider) {\n\t $urlRouterProvider.otherwise('/home');\n\n\t var timer,\n\t ctrl = function routerCtrl($state, $stateParams, $timeout) {\n\t // go to install notes by default\n\t if (!$stateParams.link) {\n\t timer = $timeout(function timer() {\n\t $state.go('docs.detail', {\n\t link: 'docsInstall'\n\t });\n\t },0);\n\t }else{\n\t $timeout.cancel(timer);\n\t }\n\t };\n\n\t ctrl.$inject = ['$state', '$stateParams', '$timeout'];\n\n\t $stateProvider\n\t .state('home', {\n\t url: '/home',\n\t templateUrl: 'partials/partial-home.html'\n\t })\n\t .state('docs', {\n\t url: '/docs',\n\t templateUrl: 'partials/partial-docs.html',\n\t controller: ctrl\n\t })\n\t .state('docs.detail', {\n\t url: '/:link',\n\t templateUrl: function($stateParams) {\n\t return $stateParams.link + '/' + $stateParams.link + '.html';\n\t },\n\t controller: ctrl\n\t })\n\t .state('contribute', {\n\t url: '/contribute',\n\t templateUrl: 'partials/partial-contribute.html'\n\t });\n\t};\n\n\texamplesRouter.$inject = ['$stateProvider', '$urlRouterProvider'];\n\n\tmodule.exports = examplesRouter;\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar BasicCtrl = function ($element, dragularService) {\n\t dragularService.cleanEnviroment();\n\t dragularService('.containerVertical');\n\t};\n\n\tBasicCtrl.$inject = ['$element', 'dragularService'];\n\n\tmodule.exports = BasicCtrl;\n\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\tvar BasicModelCtrl = function ($scope, $element, dragularService) {\n\t $scope.items1 = [{\n\t content: 'Move me, but you can only drop me in one of these containers.'\n\t }, {\n\t content: 'If you try to drop me somewhere other than these containers, I\\'ll just come back.'\n\t }, {\n\t content: 'Item 3'\n\t }, {\n\t content: 'Item 4'\n\t }];\n\t $scope.items2 = [{\n\t content: 'Item 5'\n\t }, {\n\t content: 'Item 6'\n\t }, {\n\t content: 'Item 7'\n\t }, {\n\t content: 'Item 8'\n\t }];\n\t var containers = $element.children().eq(0).children();\n\t dragularService.cleanEnviroment();\n\t // var drake = dragularService([containers[0],containers[1]],{\n\t // dragularService([containers[0]],{\n\t dragularService([containers[0], containers[1]],{\n\t containersModel: [$scope.items1, $scope.items2],\n\t // canBeAccepted: function () {\n\t // return false;\n\t // },\n\t // accepts: function () {\n\t // return false;\n\t // },\n\t // isContainer: function (el) {\n\t // return el.id == 'test';\n\t // },\n\t // isContainerModel: function () {\n\t // return $scope.items2;\n\t // }\n\t // scope: $scope\n\t });\n\n\t\t// $scope.$on('dragularcloned', myFn('cloned'));\n\t\t// $scope.$on('dragulardrag', myFn('drag'));\n\t\t// $scope.$on('dragularcancel', myFn('cancel'));\n\t\t// $scope.$on('dragulardrop', myFn('drop'));\n\t\t// $scope.$on('dragularremove', myFn('remove'));\n\t\t// $scope.$on('dragulardragend', myFn('dragend'));\n\t\t// $scope.$on('dragularshadow', myFn('shadow'));\n\t\t//\n\t\t// function myFn(eventName) {\n\t\t// \treturn function() {\n\t\t// \t\tconsole.log(eventName, arguments, drake);\n\t\t// \t};\n\t\t// }\n\n\t};\n\n\tBasicModelCtrl.$inject = ['$scope', '$element', 'dragularService'];\n\n\tmodule.exports = BasicModelCtrl;\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar BoundingBoxCtrl = function ($element, dragularService) {\n\t var boundingBox = $element[0];\n\t dragularService.cleanEnviroment();\n\n\t dragularService($element.children(), {\n\t boundingBox: boundingBox\n\t });\n\t};\n\n\tBoundingBoxCtrl.$inject = ['$element', 'dragularService'];\n\n\tmodule.exports = BoundingBoxCtrl;\n\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar BoundingBoxLockXCtrl = function ($element, dragularService) {\n\t var boundingBox = $element.children().children()[0];\n\t dragularService.cleanEnviroment();\n\t dragularService(boundingBox, {\n\t boundingBox: boundingBox,\n\t lockX: true\n\t });\n\t};\n\n\tBoundingBoxLockXCtrl.$inject = ['$element', 'dragularService'];\n\n\tmodule.exports = BoundingBoxLockXCtrl;\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar BoundingBoxLockYCtrl = function ($element, dragularService) {\n\t var boundingBox = $element.children().children()[0];\n\t dragularService.cleanEnviroment();\n\t dragularService(boundingBox, {\n\t boundingBox: boundingBox,\n\t lockY: true\n\t });\n\t};\n\n\tBoundingBoxLockYCtrl.$inject = ['$element', 'dragularService'];\n\n\tmodule.exports = BoundingBoxLockYCtrl;\n\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar CopyCtrl = function ($element, dragularService) {\n\t dragularService.cleanEnviroment();\n\t dragularService($element.children(), {\n\t copy: true\n\t });\n\t};\n\n\tCopyCtrl.$inject = ['$element', 'dragularService'];\n\n\tmodule.exports = CopyCtrl;\n\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar CopyModelCtrl = function ($scope, $element, dragularService) {\n\t $scope.items1 = [{\n\t content: 'Move me, and make copy on drop.'\n\t }, {\n\t content: 'If you try to drop me somewhere other than these containers, I\\'ll just come back.'\n\t }, {\n\t content: 'Item 3'\n\t }, {\n\t content: 'Item 4'\n\t }];\n\t $scope.items2 = [{\n\t content: 'Item 5'\n\t }, {\n\t content: 'Item 6'\n\t }, {\n\t content: 'Item 7'\n\t }, {\n\t content: 'Item 8'\n\t }];\n\t var containers = $element.children().eq(0).children();\n\t dragularService.cleanEnviroment();\n\t dragularService([containers[0],containers[1]],{\n\t containersModel: [$scope.items1, $scope.items2],\n\t copy: true\n\t });\n\t};\n\n\tCopyModelCtrl.$inject = ['$scope', '$element', 'dragularService'];\n\n\tmodule.exports = CopyModelCtrl;\n\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar CustomClassesCtrl = function ($element, dragularService) {\n\t dragularService.cleanEnviroment();\n\t dragularService($element.children(), {\n\t classes: {\n\t mirror: 'custom-green-mirror'\n\t }\n\t });\n\t};\n\n\tCustomClassesCtrl.$inject = ['$element', 'dragularService'];\n\n\tmodule.exports = CustomClassesCtrl;\n\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar DifferentOptionsModelCtrl = function ($scope, $element, dragularService) {\n\t $scope.items1 = [{\n\t content: 'Move me, but you can only drop me in one of these containers.'\n\t }, {\n\t content: 'If you try to drop me somewhere other than these containers, I\\'ll just come back.'\n\t }, {\n\t content: 'Item 3'\n\t }, {\n\t content: 'Item 4'\n\t }];\n\t $scope.items2 = [{\n\t content: 'Item 5'\n\t }, {\n\t content: 'Item 6'\n\t }, {\n\t content: 'Item 7'\n\t }, {\n\t content: 'Item 8'\n\t }];\n\n\t var containerLeft = document.querySelector('#containerLeft'),\n\t containerRight = document.querySelector('#containerRight');\n\n\t function accepts(el, target, source) {\n\t // left->right || in same container\n\t if (source === containerLeft || source === target) {\n\t return true;\n\t }\n\t }\n\n\t dragularService.cleanEnviroment();\n\t dragularService([containerLeft], {\n\t containersModel: [$scope.items1],\n\t copy: true,\n\t copySortSource: true,\n\t //move only from left to right\n\t accepts: accepts\n\t });\n\n\t dragularService([containerRight], {\n\t containersModel: [$scope.items2],\n\t removeOnSpill: true,\n\t //move only from left to right\n\t accepts: accepts\n\t });\n\n\t};\n\n\tDifferentOptionsModelCtrl.$inject = ['$scope', '$element', 'dragularService'];\n\n\tmodule.exports = DifferentOptionsModelCtrl;\n\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar DirectiveCtrl = function ($scope) {\n\t $scope.dragularOptions = {\n\t classes: {\n\t mirror: 'custom-green-mirror'\n\t },\n\t nameSpace: 'same' // just connecting left and right container\n\t };\n\t};\n\n\tDirectiveCtrl.$inject = ['$scope'];\n\n\tmodule.exports = DirectiveCtrl;\n\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar DirectiveModelCtrl = function ($scope) {\n\t $scope.items1 = [{\n\t content: 'Move me, and make copy on drop.'\n\t }, {\n\t content: 'If you try to drop me somewhere other than these containers, I\\'ll just come back.'\n\t }, {\n\t content: 'Item 3'\n\t }, {\n\t content: 'Item 4'\n\t }];\n\t $scope.items2 = [{\n\t content: 'Item 5'\n\t }, {\n\t content: 'Item 6'\n\t }, {\n\t content: 'Item 7'\n\t }, {\n\t content: 'Item 8'\n\t }];\n\t $scope.dragularOptions = {\n\t containersModel: $scope.items1,\n\t classes: {\n\t mirror: 'custom-green-mirror'\n\t },\n\t nameSpace: 'common' // just connecting left and right container\n\t };\n\t};\n\n\tDirectiveModelCtrl.$inject = ['$scope'];\n\n\tmodule.exports = DirectiveModelCtrl;\n\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports) {\n\n\t/* global angular */\n\t'use strict';\n\n\tvar DragOverEventsCtrl = function ($element, dragularService) {\n\t dragularService.cleanEnviroment();\n\t dragularService([$element.children()[0], $element.children()[2]], {\n\t nameSpace: 'apples'\n\t });\n\t dragularService([$element.children()[1], $element.children()[3]], {\n\t nameSpace: 'oranges'\n\t });\n\n\t // containers events handling\n\t function registerEvents(el) {\n\t el.on('dragularenter', function(e) {\n\t if (el[0] === e.target) { // filter bubbled\n\t el.addClass(dragularService.shared.extra ? 'gu-over-accept' : 'gu-over-decline');\n\t }\n\t });\n\t el.on('dragularleave dragularrelease', function(e) {\n\t if ((el[0] === e.target && // filter bubbled\n\t dragularService.shared.extra && // extra on dragleave contains element the drag is leaving to\n\t dragularService.shared.extra.parentElement !== e.target) || // is that element child of this container?\n\t e.type === 'dragularrelease') {\n\t el.removeClass('gu-over-accept');\n\t el.removeClass('gu-over-decline');\n\t }\n\t });\n\t }\n\n\t angular.forEach($element.children(), function forEachChild(el) {\n\t registerEvents(angular.element(el));\n\t });\n\n\t // notContainer events handling\n\t var notContainer = angular.element(document.getElementsByClassName('notContainer'));\n\t notContainer.on('dragularenter', function() {\n\t notContainer.addClass('gu-over');\n\t });\n\t notContainer.on('dragularleave dragularrelease', function() {\n\t notContainer.removeClass('gu-over');\n\t });\n\t};\n\n\tDragOverEventsCtrl.$inject = ['$element', 'dragularService'];\n\n\tmodule.exports = DragOverEventsCtrl;\n\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar EventsCtrl = function ($scope, $element, dragularService, $timeout) {\n\t dragularService.cleanEnviroment();\n\t \n\t var drake = dragularService($element.children(), {\n\t scope: $scope\n\t });\n\t $scope.$on('dragulardrag', function(e, el) {\n\t e.stopPropagation();\n\t el.className = el.className.replace(' ex-moved', '');\n\t });\n\t $scope.$on('dragulardrop', function(e, el) {\n\t e.stopPropagation();\n\t $timeout(function() {\n\t el.className += ' ex-moved';\n\t }, 0);\n\t });\n\n\t $scope.$on('dragularcloned', myFn('cloned in EventsCtrl'));\n\t $scope.$on('dragulardrag', myFn('drag in EventsCtrl'));\n\t $scope.$on('dragularcancel', myFn('cancel in EventsCtrl'));\n\t $scope.$on('dragulardrop', myFn('drop in EventsCtrl'));\n\t $scope.$on('dragularremove', myFn('remove in EventsCtrl'));\n\t $scope.$on('dragulardragend', myFn('dragend in EventsCtrl'));\n\t $scope.$on('dragularshadow', myFn('shadow in EventsCtrl'));\n\n\t function myFn(eventName) {\n\t return function() {\n\t console.log(eventName, arguments, drake);\n\t };\n\t }\n\t};\n\n\tvar Events2Ctrl = function ($scope, $element, dragularService, $timeout) {\n\t var drake = dragularService($element.children(), {\n\t scope: $scope\n\t });\n\t $scope.$on('dragulardrag', function(e, el) {\n\t e.stopPropagation();\n\t el.className = el.className.replace(' ex-moved', '');\n\t });\n\t $scope.$on('dragulardrop', function(e, el) {\n\t e.stopPropagation();\n\t $timeout(function() {\n\t el.className += ' ex-moved';\n\t }, 0);\n\t });\n\n\t $scope.$on('dragularcloned', myFn('cloned in Events2Ctrl'));\n\t $scope.$on('dragulardrag', myFn('drag in Events2Ctrl'));\n\t $scope.$on('dragularcancel', myFn('cancel in Events2Ctrl'));\n\t $scope.$on('dragulardrop', myFn('drop in Events2Ctrl'));\n\t $scope.$on('dragularremove', myFn('remove in Events2Ctrl'));\n\t $scope.$on('dragulardragend', myFn('dragend in Events2Ctrl'));\n\t $scope.$on('dragularshadow', myFn('shadow in Events2Ctrl'));\n\n\t function myFn(eventName) {\n\t return function() {\n\t console.log(eventName, arguments, drake);\n\t };\n\t }\n\t};\n\n\tEventsCtrl.$inject = ['$scope', '$element', 'dragularService', '$timeout'];\n\tEvents2Ctrl.$inject = ['$scope', '$element', 'dragularService', '$timeout'];\n\n\tmodule.exports = [EventsCtrl, Events2Ctrl];\n\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar HandleCtrl = function ($element, dragularService) {\n\t dragularService.cleanEnviroment();\n\t\tdragularService($element.children(), {\n\t moves: function(el, container, handle) {\n\t return handle.classList.contains('handle');\n\t }\n\t });\n\t};\n\n\tHandleCtrl.$inject = ['$element', 'dragularService'];\n\n\tmodule.exports = HandleCtrl;\n\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar IsContainerModelCtrl = function ($scope, $element, dragularService) {\n\t $scope.items1 = [{\n\t content: 'Move me, but you can only drop me in one of these containers.'\n\t }, {\n\t content: 'If you try to drop me somewhere other than these containers, I\\'ll just come back.'\n\t }, {\n\t content: 'Item 3'\n\t }, {\n\t content: 'Item 4'\n\t }];\n\t $scope.cartModel = [];\n\n\t var containerLeft = document.querySelector('#containerLeft');\n\n\t dragularService.cleanEnviroment();\n\t dragularService([containerLeft], {\n\t containersModel: [$scope.items1],\n\t copy: true,\n\t isContainer: function isContainer (el) {\n\t return el.id === 'cart';\n\t },\n\t isContainerModel: function getModel (){\n\t return $scope.cartModel;\n\t }\n\t });\n\n\t $scope.removeItem = function removeItem() {\n\t var index = $scope.cartModel.indexOf(this.item);\n\t $scope.cartModel.splice(index, 1);\n\t };\n\t};\n\n\tIsContainerModelCtrl.$inject = ['$scope', '$element', 'dragularService'];\n\n\tmodule.exports = IsContainerModelCtrl;\n\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar NameSpacesCtrl = function ($element, dragularService) {\n\t dragularService.cleanEnviroment();\n\t dragularService([$element.children()[0], $element.children()[2]], {\n\t nameSpace: 'apples'\n\t });\n\t dragularService($element.children()[1], {\n\t nameSpace: 'oranges'\n\t });\n\t dragularService($element.children()[3], { // mixed\n\t nameSpace: ['oranges', 'apples']\n\t });\n\t};\n\n\tNameSpacesCtrl.$inject = ['$element', 'dragularService'];\n\n\tmodule.exports = NameSpacesCtrl;\n\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar NestedNgRepeatCtrl = function ($timeout, $scope, $element, dragularService) {\n\t $timeout(function() { // timeount due to ngRepeat to be ready\n\t dragularService.cleanEnviroment();\n\t dragularService($element, {\n\t nameSpace: 'rows',\n\t moves: function rowOnly (el, container, handle) {\n\t return handle.classList.contains('row-handle');\n\t }\n\t });\n\n\t dragularService($element.children(), {\n\t nameSpace: 'cells',\n\t moves: function excludeHandle (el, container, handle) {\n\t return !handle.classList.contains('row-handle');\n\t }\n\t });\n\t }, 0);\n\t $scope.items = [{\n\t items: [{\n\t content: 'Item a1'\n\t }, {\n\t content: 'Item a2'\n\t }, {\n\t content: 'Item a3'\n\t }, {\n\t content: 'Item a4'\n\t }]\n\t }, {\n\t items: [{\n\t content: 'Item b1'\n\t }, {\n\t content: 'Item b2'\n\t }, {\n\t content: 'Item b3'\n\t }, {\n\t content: 'Item b4'\n\t }]\n\t }, {\n\t items: [{\n\t content: 'Item c1'\n\t }, {\n\t content: 'Item c2'\n\t }, {\n\t content: 'Item c3'\n\t }, {\n\t content: 'Item c4'\n\t }]\n\t }];\n\t};\n\n\tNestedNgRepeatCtrl.$inject = ['$timeout', '$scope', '$element', 'dragularService'];\n\n\tmodule.exports = NestedNgRepeatCtrl;\n\n\n/***/ }),\n/* 22 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar NestedNgRepeatWithModelCtrl = function ($timeout, $scope, $element, dragularService) {\n\t $timeout(function() { // timeount due to nested ngRepeat to be ready\n\t var container = $element.children().eq(0).children(),\n\t parentContainers = container.children(),\n\t nestedContainers = [];\n\n\t dragularService.cleanEnviroment();\n\t dragularService(container, {\n\t moves: function(el, container, handle) {\n\t return handle.classList.contains('row-handle');\n\t },\n\t containersModel: $scope.items,\n\t nameSpace: 'rows'\n\t });\n\n\t // collect nested contianers\n\t for (var i = 0; i < parentContainers.length; i++) {\n\t nestedContainers.push(parentContainers.eq(i).children()[1]);\n\t }\n\n\t dragularService(nestedContainers, {\n\t moves: function(el, container, handle) {\n\t return !handle.classList.contains('row-handle');\n\t },\n\t containersModel: (function getNestedContainersModel(){\n\t var parent = $scope.items,\n\t containersModel = [];\n\t for (var i = 0; i < parent.length; i++) {\n\t containersModel.push(parent[i].items);\n\t }\n\t return containersModel;\n\t })(),\n\t nameSpace: 'cells'\n\t });\n\t }, 0);\n\t $scope.items = [{\n\t items: [{\n\t content: 'Item a1'\n\t }, {\n\t content: 'Item a2'\n\t }, {\n\t content: 'Item a3'\n\t }, {\n\t content: 'Item a4'\n\t }]\n\t }, {\n\t items: [{\n\t content: 'Item b1'\n\t }, {\n\t content: 'Item b2'\n\t }, {\n\t content: 'Item b3'\n\t }, {\n\t content: 'Item b4'\n\t }]\n\t }, {\n\t items: [{\n\t content: 'Item c1'\n\t }, {\n\t content: 'Item c2'\n\t }, {\n\t content: 'Item c3'\n\t }, {\n\t content: 'Item c4'\n\t }]\n\t }];\n\t};\n\n\tNestedNgRepeatWithModelCtrl.$inject = ['$timeout', '$scope', '$element', 'dragularService'];\n\n\tmodule.exports = NestedNgRepeatWithModelCtrl;\n\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar NgRepeatCtrl = function ($scope, $element, dragularService) {\n\t dragularService.cleanEnviroment();\n\t dragularService($element.children());\n\t $scope.items = [{\n\t content: 'Try to add or remove some elements (click on +- buttons), you will see that it is not problem for dragular.'\n\t }, {\n\t content: 'Item 2'\n\t }, {\n\t content: 'Item 3'\n\t }, {\n\t content: 'Item 4'\n\t }];\n\t $scope.addItem = function addItem() {\n\t var index = $scope.items.indexOf(this.item) + 1;\n\t $scope.items.splice(index, 0, {\n\t content: this.item.content + '-copy'\n\t });\n\t };\n\t $scope.removeItem = function removeItem() {\n\t var index = $scope.items.indexOf(this.item);\n\t $scope.items.splice(index, 1);\n\t };\n\t};\n\n\tNgRepeatCtrl.$inject = ['$scope', '$element', 'dragularService'];\n\n\tmodule.exports = NgRepeatCtrl;\n\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar NgRepeatFilteredWithModelCtrl = function ($scope, $element, dragularService, $filter) {\n\t $scope.items1 = [{\n\t content: 'Move me, but you can only drop me in one of these containers.'\n\t }, {\n\t content: 'If you try to drop me somewhere other than these containers, I\\'ll just come back.'\n\t }, {\n\t content: 'Apple 3'\n\t }, {\n\t content: 'Orange 4'\n\t }, {\n\t content: 'Orange 5'\n\t }, {\n\t content: 'Apple 6'\n\t }, {\n\t content: 'Apple 7'\n\t }, {\n\t content: 'Apple 8'\n\t }];\n\t $scope.items2 = [{\n\t content: 'Apple 9'\n\t }, {\n\t content: 'Orange 10'\n\t }, {\n\t content: 'Orange 11'\n\t }, {\n\t content: 'Apple 12'\n\t }, {\n\t content: 'Orange 13'\n\t }, {\n\t content: 'Apple 14'\n\t }];\n\t $scope.filter1query = 'Orange';\n\t $scope.filter2query = 'Orange';\n\t $scope.filteredModel1 = [];\n\t $scope.filteredModel2 = [];\n\t $scope.getFilteredModel = function (filteredModel, items, filterQuery) {\n\t filteredModel.length = 0;\n\t /*\n\t * Following one-liner is same like:\n\t * var filteredModelTemp = $filter('filter')(items, filterQuery);\n\t * angular.forEach(filteredModelTemp, function(item){\n\t * filteredModel.push(item);\n\t * });\n\t * Or like:\n\t * var filteredModelTemp = $filter('filter')(items, filterQuery);\n\t * for(var i; i < filteredModelTemp.length; i++){\n\t * filteredModel.push(filteredModelTemp[i]);\n\t * }\n\t *\n\t * You cannot just assign filtered array to filteredModel like this:\n\t * filteredModel = $filter('filter')(items, filterQuery);\n\t * Because you would replace the array object you provide to dragular with new one.\n\t * So dragular will continue to use the one it was provided on init.\n\t * Hopefully I make it clear. :)\n\t */\n\t [].push.apply(filteredModel, $filter('filter')(items, filterQuery));\n\n\t // Example with orderBy filter:\n\t // var tmp = [];\n\t // [].push.apply(tmp, $filter('filter')(items, filterQuery));\n\t // [].push.apply(filteredModel, $filter('orderBy')(tmp, '+content'));\n\n\t return filteredModel;\n\t };\n\t var containers = $element.children().eq(1).children();\n\t dragularService.cleanEnviroment();\n\t dragularService([containers[0],containers[1]],{\n\t containersModel: [$scope.items1, $scope.items2],\n\t containersFilteredModel: [$scope.filteredModel1, $scope.filteredModel2]\n\t });\n\t};\n\n\tNgRepeatFilteredWithModelCtrl.$inject = ['$scope', '$element', 'dragularService', '$filter'];\n\n\tmodule.exports = NgRepeatFilteredWithModelCtrl;\n\n\n/***/ }),\n/* 25 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar NgRepeatWithModelCtrl = function ($scope, $element, dragularService) {\n\t $scope.items = [{\n\t content: 'Try to add or remove some elements (click on +- buttons), you will see that it is not problem for dragular.'\n\t }, {\n\t content: 'Item 2'\n\t }, {\n\t content: 'Item 3'\n\t }, {\n\t content: 'Item 4'\n\t }];\n\t dragularService.cleanEnviroment();\n\t dragularService($element.children().eq(0).children(), {containersModel: $scope.items});\n\t $scope.addItem = function addItem() {\n\t var index = $scope.items.indexOf(this.item) + 1;\n\t $scope.items.splice(index, 0, {\n\t content: this.item.content + '-copy'\n\t });\n\t };\n\t $scope.removeItem = function removeItem() {\n\t var index = $scope.items.indexOf(this.item);\n\t $scope.items.splice(index, 1);\n\t };\n\t};\n\n\tNgRepeatWithModelCtrl.$inject = ['$scope', '$element', 'dragularService'];\n\n\tmodule.exports = NgRepeatWithModelCtrl;\n\n\n/***/ }),\n/* 26 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar RemoveOnSpillCtrl = function ($element, dragularService) {\n\t dragularService.cleanEnviroment();\n\t\tdragularService($element.children(), {\n\t removeOnSpill: true\n\t });\n\t};\n\n\tRemoveOnSpillCtrl.$inject = ['$element', 'dragularService'];\n\n\tmodule.exports = RemoveOnSpillCtrl;\n\n\n/***/ }),\n/* 27 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar RemoveOnSpillWithModelCtrl = function ($scope, $element, dragularService) {\n\t $scope.items1 = [{\n\t content: 'Move me, but you can only drop me in containers.'\n\t }, {\n\t content: 'If you try to drop me somewhere other than containers, I\\'ll die a fiery death.'\n\t }, {\n\t content: 'Item 3'\n\t }, {\n\t content: 'Item 4'\n\t }];\n\t $scope.items2 = [{\n\t content: 'You can drop me in the left container.'\n\t }, {\n\t content: 'Item 6'\n\t }, {\n\t content: 'Item 7'\n\t }, {\n\t content: 'Item 8'\n\t }];\n\t var containers = $element.children().eq(0).children();\n\t dragularService.cleanEnviroment();\n\t dragularService([containers[0], containers[1]], {\n\t containersModel: [$scope.items1, $scope.items2],\n\t removeOnSpill: true\n\t });\n\t};\n\n\tRemoveOnSpillWithModelCtrl.$inject = ['$scope', '$element', 'dragularService'];\n\n\tmodule.exports = RemoveOnSpillWithModelCtrl;\n\n\n/***/ }),\n/* 28 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar RevertOnSpillCtrl = function ($element, dragularService) {\n\t dragularService.cleanEnviroment();\n\t dragularService($element.children(), {\n\t revertOnSpill: true\n\t });\n\t};\n\n\tRevertOnSpillCtrl.$inject = ['$element', 'dragularService'];\n\n\tmodule.exports = RevertOnSpillCtrl;\n\n\n/***/ }),\n/* 29 */\n/***/ (function(module, exports) {\n\n\t/* global angular */\n\t'use strict';\n\n\tvar ScrollingDragCtrl = function ($interval, $element, dragularService) {\n\t var timer,\n\t leftScrollContainer = document.getElementById('leftScroll'),\n\t rightScrollContainer = document.getElementById('rightScroll'),\n\t leftTopBar = document.getElementById('leftTopBar'),\n\t leftBottomBar = document.getElementById('leftBottomBar'),\n\t rightTopBar = document.getElementById('rightTopBar'),\n\t rightBottomBar = document.getElementById('rightBottomBar');\n\n\t dragularService.cleanEnviroment();\n\t dragularService([leftScrollContainer, rightScrollContainer]);\n\n\t registerEvents(leftTopBar, leftScrollContainer, -5);\n\t registerEvents(leftBottomBar, leftScrollContainer, 5);\n\t registerEvents(rightTopBar, rightScrollContainer, -5);\n\t registerEvents(rightBottomBar, rightScrollContainer, 5);\n\n\t function registerEvents(bar, container, inc, speed) {\n\t if (!speed) {\n\t speed = 20;\n\t }\n\t angular.element(bar).on('dragularenter', function() {\n\t container.scrollTop += inc;\n\t timer = $interval(function moveScroll() {\n\t container.scrollTop += inc;\n\t }, speed);\n\t });\n\t angular.element(bar).on('dragularleave dragularrelease', function() {\n\t $interval.cancel(timer);\n\t });\n\t }\n\t};\n\n\tScrollingDragCtrl.$inject = ['$interval', '$element', 'dragularService'];\n\n\tmodule.exports = ScrollingDragCtrl;\n\n\n/***/ }),\n/* 30 */\n/***/ (function(module, exports) {\n\n\t/* global angular */\n\t'use strict';\n\n\tNestedRepeatsWithCustomDirective.$inject = ['dragularService', '$element', '$scope', '$timeout'];\n\n\tangular.module('examplesApp')\n\t\t.directive('questionDirective', QuestionsDirective)\n\t\t.controller('QuestionsController', QuestionsController);\n\n\tmodule.exports = NestedRepeatsWithCustomDirective;\n\n\n\n\tfunction NestedRepeatsWithCustomDirective( dragularService, $element, $scope, $timeout) {\n\n\t\tdragularService.cleanEnviroment();\n\n\t\t$scope.items = [\n\t\t\t{\n\t\t\t\tquestions:[\n\t\t\t\t\t{\n\t\t\t\t\t\ttext: 'text1',\n\t\t\t\t\t\tpoints: 1\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ttext: 'text2',\n\t\t\t\t\t\tpoints: 2\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ttext: 'text3',\n\t\t\t\t\t\tpoints: 3\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\torder: 1,\n\t\t\t\tname: 'x',\n\t\t\t\tage: '1'\n\t\t\t},\n\t\t\t{\n\t\t\t\tquestions:[\n\t\t\t\t\t{\n\t\t\t\t\t\ttext: 'text1',\n\t\t\t\t\t\tpoints: 1\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ttext: 'text2',\n\t\t\t\t\t\tpoints: 2\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ttext: 'text3',\n\t\t\t\t\t\tpoints: 3\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\torder: 2,\n\t\t\t\tname: 'y',\n\t\t\t\tage: '2'\n\t\t\t}, {\n\t\t\t\tquestions:[\n\t\t\t\t\t{\n\t\t\t\t\t\ttext: 'text1',\n\t\t\t\t\t\tpoints: 1\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ttext: 'text2',\n\t\t\t\t\t\tpoints: 2\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ttext: 'text3',\n\t\t\t\t\t\tpoints: 3\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\torder: 3,\n\t\t\t\tname: 'z',\n\t\t\t\tage: '3'\n\t\t\t},\n\t\t\t{\n\t\t\t\tquestions:[\n\t\t\t\t\t{\n\t\t\t\t\t\ttext: 'text1',\n\t\t\t\t\t\tpoints: 1\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ttext: 'text2',\n\t\t\t\t\t\tpoints: 2\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ttext: 'text3',\n\t\t\t\t\t\tpoints: 3\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\torder: 1,\n\t\t\t\tname: 'x',\n\t\t\t\tage: '4'\n\t\t\t}, {\n\t\t\t\tquestions:[\n\t\t\t\t\t{\n\t\t\t\t\t\ttext: 'text1',\n\t\t\t\t\t\tpoints: 1\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ttext: 'text2',\n\t\t\t\t\t\tpoints: 2\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ttext: 'text3',\n\t\t\t\t\t\tpoints: 3\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\torder: 2,\n\t\t\t\tname: 'y',\n\t\t\t\tage: '5'\n\t\t\t}, {\n\t\t\t\tquestions:[\n\t\t\t\t\t{\n\t\t\t\t\t\ttext: 'text1',\n\t\t\t\t\t\tpoints: 1\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ttext: 'text2',\n\t\t\t\t\t\tpoints: 2\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ttext: 'text3',\n\t\t\t\t\t\tpoints: 3\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\torder: 3,\n\t\t\t\tname: 'z',\n\t\t\t\tage: '6'\n\t\t\t}];\n\n\t\t// timeout due to document not ready, jsfiddle settings issue?\n\t\t$timeout(function() {\n\n\t\t\tdragularService('#items', {\n\t\t\t\tcontainersModel: 'items',\n\t\t\t\tscope: $scope,\n\t\t\t\tmoves: function itemsOnly (el, container, handle) {\n\t\t\t\t\treturn handle.classList.contains('item');\n\t\t\t\t},\n\t\t\t\tnameSpace:'items'\n\t\t\t});\n\n\t\t\t$scope.$on('dragulardrop', function(){\n\t\t\t\t$scope.items.forEach(function(item, index){\n\t\t\t\t\titem.order = index + 1;\n\t\t\t\t});\n\t\t\t});\n\n\t\t});\n\n\t}\n\n\tfunction QuestionsDirective() {\n\t\treturn {\n\t\t\trestrict : 'E',\n\t\t\ttemplate : '\\n\\n\\n// JS\\n controller(\\'Basic\\', [\\'$element\\', \\'dragularService\\', function TodoCtrl($element, dragularService) {\\n dragularService(\\'.containerVertical\\');\\n }])\\n
\\n\\n// CSS\\n.clickedClass {\\n background-color: orange !important;\\n}\\n
\\n\\n<!-- HTML -->\\n <div class=\\'wrapper\\' ng-controller="Basic">\\n <div class=\\'containerVertical\\'>\\n <div>Move me, but you can only drop me in one of these containers.</div>\\n <div>If you try to drop me somewhere other than these containers, I\\'ll just come back.</div>\\n <div>Item 3.</div>\\n <div>Item 6.</div>\\n </div>\\n <div class=\\'containerVertical\\'>\\n <div>You can drop me in the left container, otherwise I\\'ll stay here.</div>\\n <div ng-click=\\\"clicked = !clicked\\\" ng-class=\\\"clicked && \\'clickedClass\\'\\\">Try to click me, dragular distinguish drag from click</div>\\n <div>Item 5.</div>\\n </div>\\n</div>\\n
\\n
download dragular.js and dragular.css from dist folder
\\nOR clone git
\\n\\ngit clone http://github.com/luckylooke/dragular.git\\n
\\nOR use npm
\\n\\n[sudo] npm install dragular\\n
\\nOR use bower
\\n\\nbower install dragular\\n
\\nAND include files into your project
\\n\\n<link href=\\'styles/dragular.css\\' rel=\\'stylesheet\\' type=\\'text/css\\' />\\n<script src=\\'scripts/dragular.js\\'></script>\\n
\\nAND put dragularModule into dependency array
\\n\\nvar app = angular.module(\\'myApp\\', [\\'dragularModule\\', \\'otherDependencies\\']);\\n
\\nDONE :)
\\n\");\n\t$templateCache.put(\"exampleBoundingBox/exampleBoundingBox.html\",\"\\n \\n dragularService([$element.children(), {\\n boundingBox: $element\\n });\\n
\\n
\\n Items1:\\n\\n
{{items1 | json}}
Items2:\\n\\n
{{items2 | json}}
\\n\\n\\n// JS\\n controller(\\'BasicModel\\', [\\'$scope\\', \\'$element\\', \\'dragularService\\', function TodoCtrl($scope, $element, dragularService) {\\n $scope.items1 = [{\\n content: \\'Move me, but you can only drop me in one of these containers.\\'\\n }, {\\n content: \\'If you try to drop me somewhere other than these containers, I\\\\\\'ll just come back.\\'\\n }, {\\n content: \\'Item 3\\'\\n }, {\\n content: \\'Item 4\\'\\n }];\\n $scope.items2 = [{\\n content: \\'Item 5\\'\\n }, {\\n content: \\'Item 6\\'\\n }, {\\n content: \\'Item 7\\'\\n }, {\\n content: \\'Item 8\\'\\n }];\\n var containers = $element.children().children();\\n dragularService([containers[0],containers[1]],{\\n containersModel: [$scope.items1, $scope.items2]\\n });\\n }])\\n
\\n\\n<!-- HTML -->\\n<div class=\\'wrapper\\' ng-controller="Basic">\\n <div class=\\'tableRow\\'>\\n <div class=\\'containerVertical\\'>\\n <div ng-repeat="item in items1">{{item.content}}</div>\\n </div>\\n <div class=\\'containerVertical\\'>\\n <div ng-repeat="item in items2">{{item.content}}</div>\\n </div>\\n </div>\\n <div class="tableRow">\\n <div class="container">\\n <div>Items1:\\n <br/>{{items1 | json}}</div>\\n </div>\\n <div class="container">\\n <div>Items2:\\n <br/>{{items2 | json}}</div>\\n </div>\\n </div>\\n</div>\\n
\\n
\\n \\n dragularService([$element.children()[0].children(), {\\n boundingBox: $element.children()[0],\\n lockX: true\\n });\\n
\\n
\\n \\n \\n dragularService([$element.children()[0].children(), {\\n boundingBox: $element.children()[0],\\n lockY: true\\n });\\n
\\n
\\n \\n\\n\\n// JS\\n controller(\\'Copy\\', [\\'$element\\', \\'dragularService\\', function TodoCtrl($element, dragularService) {\\n dragularService($element.children(), {\\n copy: true\\n });\\n }])\\n
\\n\\n<!-- HTML -->\\n<div class=\\'wrapper\\' ng-controller="Copy" ng-hide="globals.showModelExamples">\\n <div id=\\'left2\\' class=\\'containerVertical\\'>\\n <div>Move me, and make copy on drop.</div>\\n <div>If you try to drop me somewhere other than these containers, I\\'ll just come back.</div>\\n </div>\\n <div id=\\'right2\\' class=\\'containerVertical\\'>\\n <div>You can drop me in the left container, otherwise I\\'ll stay here.</div>\\n </div>\\n </div>\\n
\\n
\\n {{ items1 | json }}\\n\\n
\\n {{ items2 | json }}\\n\\n
\\n\\n\\n// JS\\n controller(\\'CopyModel\\', [\\'$scope\\', \\'$element\\', \\'dragularService\\', function TodoCtrl($scope, $element, dragularService) {\\n $scope.items1 = [{\\n content: \\'Move me, and make copy on drop.\\'\\n }, {\\n content: \\'If you try to drop me somewhere other than these containers, I\\\\\\'ll just come back.\\'\\n }, {\\n content: \\'Item 3\\'\\n }, {\\n content: \\'Item 4\\'\\n }];\\n $scope.items2 = [{\\n content: \\'Item 5\\'\\n }, {\\n content: \\'Item 6\\'\\n }, {\\n content: \\'Item 7\\'\\n }, {\\n content: \\'Item 8\\'\\n }];\\n var containers = $element.children().children();\\n dragularService([containers[0],containers[1]],{\\n containersModel: [$scope.items1, $scope.items2],\\n copy: true\\n });\\n }])\\n
\\n\\n<!-- HTML -->\\n<div class=\\'wrapper\\' ng-controller="CopyModel" ng-show="globals.showModelExamples">\\n <div class=\\'tableRow\\'>\\n <div class=\\'containerVertical\\'>\\n <div ng-repeat="item in items1">{{item.content}}</div>\\n </div>\\n <div class=\\'containerVertical\\'>\\n <div ng-repeat="item in items2">{{item.content}}</div>\\n </div>\\n </div>\\n <div class="tableRow">\\n <div class="container">\\n <div>Items1:\\n <br/>{{items1 | json}}</div>\\n </div>\\n <div class="container">\\n <div>Items2:\\n <br/>{{items2 | json}}</div>\\n </div>\\n </div>\\n </div>\\n
\\n
\\n \\n dragularService([document.getElementById(left), document.getElementById(right)], { classes: {\\n mirror: \\'custom-green-mirror\\'\\n } });\\n\\n // Default classes are:\\n option.classes = {\\n mirror: \\'gu-mirror\\',\\n hide: \\'gu-hide\\',\\n unselectable: \\'gu-unselectable\\',\\n transit: \\'gu-transit\\',\\n overActive: \\'gu-over-active\\',\\n overAccepts: \\'gu-over-accept\\',\\n overDeclines: \\'gu-over-decline\\'\\n };\\n
\\n
\\nItems1:\\n\\n
{{items1 | json}}
Items2:\\n\\n
{{items2 | json}}
\\n\\n\\n// JS\\n .controller(\\'DifferentOptionsModel\\', [\\'$scope\\', \\'$element\\', \\'dragularService\\', function TodoCtrl($scope, $element, dragularService) {\\n $scope.items1 = [{\\n content: \\'Move me, but you can only drop me in one of these containers.\\'\\n }, {\\n content: \\'If you try to drop me somewhere other than these containers, I\\\\\\'ll just come back.\\'\\n }, {\\n content: \\'Item 3\\'\\n }, {\\n content: \\'Item 4\\'\\n }];\\n $scope.items2 = [{\\n content: \\'Item 5\\'\\n }, {\\n content: \\'Item 6\\'\\n }, {\\n content: \\'Item 7\\'\\n }, {\\n content: \\'Item 8\\'\\n }];\\n\\n var containerLeft = document.querySelector(\\'#containerLeft\\'),\\n containerRight = document.querySelector(\\'#containerRight\\');\\n\\n function accepts(el, target, source) {\\n if (source === containerLeft || source === target) {\\n return true;\\n }\\n }\\n\\n dragularService([containerLeft], {\\n containersModel: [$scope.items1],\\n copy: true,\\n //move only from left to right \\n accepts: accepts\\n });\\n\\n dragularService([containerRight], {\\n containersModel: [$scope.items2],\\n removeOnSpill: true,\\n //move only from left to right \\n accepts: accepts\\n });\\n\\n }])\\n
\\n\\n<!-- HTML -->\\n<div class=\\'wrapper\\' ng-controller="DifferentOptionsModel">\\n <div class=\\'tableRow\\'>\\n <div id="containerLeft" class=\\'containerVertical\\'>\\n <div ng-repeat="item in items1">{{item.content}}</div>\\n </div>\\n <div id="containerRight" class=\\'containerVertical\\'>\\n <div ng-repeat="item in items2">{{item.content}}</div>\\n </div>\\n </div>\\n <div class="tableRow">\\n <div class=\\'containerVertical\\'>\\n <pre>Items1:\\n <br/>{{items1 | json}}</pre>\\n </div>\\n <div class=\\'containerVertical\\'>\\n <pre>Items2:\\n <br/>{{items2 | json}}</pre>\\n </div>\\n </div>\\n </div>\\n
\\n
\\n\\n\\n// JS\\n controller(\\'Directive\\', [\\'$scope\\', \\'dragularService\\', function TodoCtrl($scope) {\\n $scope.dragularOptions = {\\n classes: {\\n mirror: \\'custom-green-mirror\\'\\n },\\n nameSpace: \\'common\\' // just connecting left and right container\\n };\\n }])\\n
\\n\\n<!-- HTML -->\\n<div class=\\'wrapper\\' ng-controller="Directive">\\n <div class=\\'containerVertical\\' dragular="dragularOptions">\\n <div>Move me, but you can only drop me in one of these containers.</div>\\n <div>If you try to drop me somewhere other than these containers, I\\'ll just come back.</div>\\n <div>Item 3.</div>\\n <div>Item 6.</div>\\n </div>\\n <div class=\\'containerVertical\\' dragular=\\'{"classes":{"mirror":"custom-green-mirror"},"nameSpace":"same"}\\'>\\n <div>You can drop me in the left container, otherwise I\\'ll stay here.</div>\\n <div>Item 4.</div>\\n <div>Item 5.</div>\\n </div>\\n </div>\\n
\\n
\\n \\n\\n\\n// JS\\n controller(\\'DirectiveModel\\', [\\'$scope\\', function TodoCtrl($scope) {\\n $scope.items1 = [{\\n content: \\'Move me, and make copy on drop.\\'\\n }, {\\n content: \\'If you try to drop me somewhere other than these containers, I\\\\\\'ll just come back.\\'\\n }, {\\n content: \\'Item 3\\'\\n }, {\\n content: \\'Item 4\\'\\n }];\\n $scope.items2 = [{\\n content: \\'Item 5\\'\\n }, {\\n content: \\'Item 6\\'\\n }, {\\n content: \\'Item 7\\'\\n }, {\\n content: \\'Item 8\\'\\n }];\\n $scope.dragularOptions = {\\n containersModel: $scope.items1,\\n classes: {\\n mirror: \\'custom-green-mirror\\'\\n },\\n nameSpace: \\'common\\' // just connecting left and right container\\n };\\n }])\\n
\\n\\n<!-- HTML -->\\n <div class=\\'wrapper\\' ng-controller="DirectiveModel">\\n <div class=\\'containerVertical\\' dragular="dragularOptions">\\n <div ng-repeat="item in items1">{{item.content}}</div>\\n </div>\\n <div class=\\'containerVertical\\' dragular=\\'{"containersModel":"items2","classes":{"mirror":"custom-green-mirror"},"nameSpace":"common"}\\'>\\n <div ng-repeat="item in items2">{{item.content}}</div>\\n </div>\\n</div>\\n
\\n
You can interact with dragging element by litening to dragOver events. Usually you want to containers show wheather they accepts element or not, but you can use it anywhere. DragOver events are: dragenter, dragleave and dragrelease. On dragOver events dragularService reveals several useful properties.
\\n\\ndragularService.shared.item | \\nitem beeing dragged (it is copy of item if copy is enabled via options) | \\n
dragularService.shared.source | \\nsource container item is dragged from | \\n
dragularService.shared.sourceModel | \\nsource container model representation if model was porvided | \\n
dragularService.shared.initialIndex | \\noriginal index of item, can be used to get item model from sourceModel | \\n
dragularService.shared.extra | \\ncontains accepting information (boolean) on dragenter, element drag is leaving to on dragleave and element behind the cursor on dragrelease | \\n
Try to drag over the not-container too.
\\n\\n \\n<!-- HTML -->\\n <div class=\\'wrapper\\' ng-controller="DragOverEvents">\\n <div class=\\'container width25\\'>\\n <div>apples and oranges cannot be mixed</div>\\n <div>apple 2</div>\\n ...\\n </div>\\n <div class=\\'container width25\\'>\\n <div>orange 1</div>\\n <div>orange 2</div>\\n ...\\n </div>\\n <div class=\\'container width25\\'>\\n <div>apple 5</div>\\n <div>apple 6</div>\\n ...\\n </div>\\n <div class=\\'container width25\\'>\\n <div>orange 5</div>\\n <div>orange 6</div>\\n ...\\n </div>\\n </div>\\n <div class="notContainer"> Test active class on NOT container.</div>\\n
\\n
\\n\\n \\n \\n // CSS\\n \\n.notContainer.gu-over {\\n background-color: yellow;\\n}\\n\\n.containerVertical.gu-over-accept {\\n background-color: green;\\n}\\n\\n.containerVertical.gu-over-decline {\\n background-color: red;\\n}\\n
\\n
\\n\\n \\n \\n // JS\\n controller(\\'DragOverEvents\\', [\\'$element\\', \\'dragularService\\', function TodoCtrl($element, dragularService) {\\n dragularService.cleanEnviroment();\\n dragularService([$element.children()[0], $element.children()[2]], {\\n nameSpace: \\'apples\\'\\n });\\n dragularService([$element.children()[1], $element.children()[3]], {\\n nameSpace: \\'oranges\\'\\n });\\n\\n // containers events handling\\n function registerEvents(el) {\\n el.on(\\'dragularenter\\', function(e) {\\n if (el[0] === e.target) { // filter bubbled\\n el.addClass(dragularService.shared.extra ? \\'gu-over-accept\\' : \\'gu-over-decline\\');\\n }\\n });\\n el.on(\\'dragularleave dragularrelease\\', function(e) {\\n if ((el[0] === e.target && // filter bubbled\\n dragularService.shared.extra && // extra on dragleave contains element the drag is leaving to\\n dragularService.shared.extra.parentElement !== e.target) // is that element child of this container?\\n || e.type === \\'dragularrelease\\') {\\n el.removeClass(\\'gu-over-accept\\');\\n el.removeClass(\\'gu-over-decline\\');\\n }\\n });\\n }\\n\\n angular.forEach($element.children(), function forEachChild(el) {\\n registerEvents(angular.element(el));\\n });\\n\\n // notContainer events handling\\n var notContainer = angular.element(document.getElementsByClassName(\\'notContainer\\'));\\n notContainer.on(\\'dragularenter\\', function() {\\n notContainer.addClass(\\'gu-over\\');\\n });\\n notContainer.on(\\'dragularleave dragularrelease\\', function() {\\n notContainer.removeClass(\\'gu-over\\');\\n });\\n }])\\n
\\n
\\nEvents affecting more than on cotrollers are emitted on both scopes if provided.
\\n\\n \\nvar EventsCtrl = function ($scope, $element, dragularService, $timeout) {\\n \\n var drake = dragularService($element.children(), {\\n scope: $scope\\n });\\n $scope.$on(\\'dragulardrag\\', function(e, el) {\\n e.stopPropagation();\\n el.className = el.className.replace(\\' ex-moved\\', \\'\\');\\n });\\n $scope.$on(\\'dragulardrop\\', function(e, el) {\\n e.stopPropagation();\\n $timeout(function() {\\n el.className += \\' ex-moved\\';\\n }, 0);\\n });\\n\\n $scope.$on(\\'dragularcloned\\', myFn(\\'cloned in EventsCtrl\\'));\\n $scope.$on(\\'dragulardrag\\', myFn(\\'drag in EventsCtrl\\'));\\n $scope.$on(\\'dragularcancel\\', myFn(\\'cancel in EventsCtrl\\'));\\n $scope.$on(\\'dragulardrop\\', myFn(\\'drop in EventsCtrl\\'));\\n $scope.$on(\\'dragularremove\\', myFn(\\'remove in EventsCtrl\\'));\\n $scope.$on(\\'dragulardragend\\', myFn(\\'dragend in EventsCtrl\\'));\\n $scope.$on(\\'dragularshadow\\', myFn(\\'shadow in EventsCtrl\\'));\\n\\n function myFn(eventName) {\\n return function() {\\n console.log(eventName, arguments, drake);\\n };\\n }\\n};\\n\\nvar Events2Ctrl = function ($scope, $element, dragularService, $timeout) {\\n var drake = dragularService($element.children(), {\\n scope: $scope\\n });\\n $scope.$on(\\'dragulardrag\\', function(e, el) {\\n e.stopPropagation();\\n el.className = el.className.replace(\\' ex-moved\\', \\'\\');\\n });\\n $scope.$on(\\'dragulardrop\\', function(e, el) {\\n e.stopPropagation();\\n $timeout(function() {\\n el.className += \\' ex-moved\\';\\n }, 0);\\n });\\n\\n $scope.$on(\\'dragularcloned\\', myFn(\\'cloned in Events2Ctrl\\'));\\n $scope.$on(\\'dragulardrag\\', myFn(\\'drag in Events2Ctrl\\'));\\n $scope.$on(\\'dragularcancel\\', myFn(\\'cancel in Events2Ctrl\\'));\\n $scope.$on(\\'dragulardrop\\', myFn(\\'drop in Events2Ctrl\\'));\\n $scope.$on(\\'dragularremove\\', myFn(\\'remove in Events2Ctrl\\'));\\n $scope.$on(\\'dragulardragend\\', myFn(\\'dragend in Events2Ctrl\\'));\\n $scope.$on(\\'dragularshadow\\', myFn(\\'shadow in Events2Ctrl\\'));\\n\\n function myFn(eventName) {\\n return function() {\\n console.log(eventName, arguments, drake);\\n };\\n }\\n};\\n
\\n
\\n\\n \\n dragularService([document.getElementById(left), document.getElementById(right)], {\\n moves: function (el, container, handle) {\\n return handle.className === \\'handle\\';\\n }\\n });\\n
\\n
\\nItems1:\\n\\n
{{items1 | json}}
Cart:\\n\\n
{{cartModel | json}}
\\n\\n\\n// JS\\n .controller(\\'IsContainerModel\\', [\\'$scope\\', \\'$element\\', \\'dragularService\\', function TodoCtrl($scope, $element, dragularService) {\\n $scope.items1 = [{\\n content: \\'Move me, but you can only drop me in one of these containers.\\'\\n }, {\\n content: \\'If you try to drop me somewhere other than these containers, I\\\\\\'ll just come back.\\'\\n }, {\\n content: \\'Item 3\\'\\n }, {\\n content: \\'Item 4\\'\\n }];\\n $scope.cartModel = [];\\n\\n var containerLeft = document.querySelector(\\'#containerLeft\\');\\n\\n dragularService.cleanEnviroment();\\n dragularService([containerLeft], {\\n containersModel: [$scope.items1],\\n copy: true,\\n isContainer: function isContainer (el) {\\n return el.id === \\'cart\\';\\n },\\n isContainerModel: function getModel (){\\n return $scope.cartModel;\\n }\\n });\\n\\n $scope.removeItem = function removeItem() {\\n var index = $scope.cartModel.indexOf(this.item);\\n $scope.cartModel.splice(index, 1);\\n };\\n\\n }])\\n
\\n\\n<!-- HTML -->\\n <div class=\\'wrapper\\' ng-controller="IsContainerModel">\\n <div class=\\'tableRow\\'>\\n <div id="containerLeft" class=\\'containerVertical\\'>\\n <div ng-repeat="item in items1">{{item.content}}</div>\\n </div>\\n <div id="cart" class=\\'containerVertical\\'>\\n <div class=\\'cursorDefault\\' ng-repeat="item in cartModel">{{item.content}}\\n <button class=\\'cursorDefault\\' ng-click="removeItem()">x</button></div>\\n </div>\\n </div>\\n <div class="tableRow">\\n <div class=\\'containerVertical\\'>\\n <pre>Items1:\\n <br/>{{items1 | json}}</pre>\\n </div>\\n <div class=\\'containerVertical\\'>\\n <pre>Cart:\\n <br/>{{cartModel | json}}</pre>\\n </div>\\n </div>\\n </div>\\n
\\n
\\n \\ndragularService([$element.children()[0], $element.children()[2]], {\\n nameSpace: \\'apples\\'\\n});\\ndragularService($element.children()[1], {\\n nameSpace: \\'oranges\\'\\n});\\ndragularService($element.children()[3], { // mixed\\n nameSpace: [\\'oranges\\', \\'apples\\']\\n});\\n
\\n
\\n \\n \\n // HTML\\n\\n <div ng-controller="Example15">\\n <div ng-repeat="item in items" class=\\'exampleRow\\'>\\n <div class="row-handle">Row {{$index}}</div>\\n <div ng-repeat="item in item.items" class="exampleCell">{{item.content}}</div>\\n </div>\\n </div>\\n
\\n
\\n \\n \\n // CSS\\n\\n .exampleRow {\\n display: flex;\\n flex-direction: row;\\n }\\n\\n .exampleCell {\\n flex-grow: 1;\\n }\\n\\n .exampleRow,\\n .exampleCell {\\n margin: 10px;\\n padding: 10px;\\n background-color: rgba(0, 0, 0, 0.2);\\n cursor: move;\\n cursor: grab;\\n cursor: -moz-grab;\\n cursor: -webkit-grab;\\n }\\n
\\n
\\n \\n \\n // JS\\n\\n .controller(\\'NestedNgRepeat\\', [\\'$timeout\\', \\'$scope\\', \\'$element\\', \\'dragularService\\', function NestedNgRepeatCtrl($timeout, $scope, $element, dragularService) {\\n $timeout(function() { // timeount due to ngRepeat to be ready\\n dragularService($element, {\\n nameSpace: \\'rows\\',\\n moves: function rowOnly (el, container, handle) {\\n return handle.classList.contains(\\'row-handle\\');\\n }\\n });\\n dragularService($element.children(), {\\n nameSpace: \\'cells\\',\\n moves: function excludeHandle (el, container, handle) {\\n return !handle.classList.contains(\\'row-handle\\');\\n }\\n });\\n }, 0);\\n $scope.items = [{\\n items: [{\\n content: \\'Item a1\\'\\n }, {\\n content: \\'Item a2\\'\\n }, {\\n content: \\'Item a3\\'\\n }, {\\n content: \\'Item a4\\'\\n }]\\n }, {\\n items: [{\\n content: \\'Item b1\\'\\n }, {\\n content: \\'Item b2\\'\\n }, {\\n content: \\'Item b3\\'\\n }, {\\n content: \\'Item b4\\'\\n }]\\n }, {\\n items: [{\\n content: \\'Item c1\\'\\n }, {\\n content: \\'Item c2\\'\\n }, {\\n content: \\'Item c3\\'\\n }, {\\n content: \\'Item c4\\'\\n }]\\n }];\\n }])\\n
\\n
\\n\\n\\nItems:\\n\\n
{{items | json}}
\\n \\n<!-- HTML -->\\n<div ng-controller="NestedNgRepeatWithModel">\\n <div class=\\'containerVertical\\'>\\n <div ng-repeat="item in items" class=\\'exampleRow\\'>\\n <div class="row-handle">Row {{::$index}}</div>\\n <div class="exampleRow exampleCell containerNested">\\n <div ng-repeat="item in item.items" class="exampleCell">{{item.content}}</div>\\n </div>\\n </div>\\n </div>\\n</div>\\n
\\n
\\n \\n \\n // CSS\\n\\n .exampleRow {\\n display: flex;\\n flex-direction: row;\\n }\\n\\n .exampleCell {\\n flex-grow: 1;\\n }\\n\\n .exampleRow,\\n .exampleCell {\\n margin: 10px;\\n padding: 10px;\\n background-color: rgba(0, 0, 0, 0.2);\\n cursor: move;\\n cursor: grab;\\n cursor: -moz-grab;\\n cursor: -webkit-grab;\\n }\\n
\\n
\\n \\n \\n // JS\\n.controller(\\'NestedNgRepeatWithModel\\', [\\'$timeout\\', \\'$scope\\', \\'$element\\', \\'dragularService\\', function NestedNgRepeatWithModelCtrl($timeout, $scope, $element, dragularService) {\\n $timeout(function() { // timeount due to nested ngRepeat to be ready\\n var container = $element.children().eq(0).children(),\\n parentContainers = container.children(),\\n nestedContainers = [];\\n\\n dragularService(container, {\\n moves: function(el, container, handle) {\\n return handle.classList.contains(\\'row-handle\\');\\n },\\n containersModel: $scope.items,\\n nameSpace: \\'rows\\'\\n });\\n\\n // collect nested contianers\\n for (var i = 0; i < parentContainers.length; i++) {\\n nestedContainers.push(parentContainers.eq(i).children()[1]);\\n }\\n\\n dragularService(nestedContainers, {\\n moves: function(el, container, handle) {\\n return !handle.classList.contains(\\'row-handle\\');\\n },\\n containersModel: (function getNestedContainersModel(){\\n var parent = $scope.items,\\n containersModel = [];\\n for (var i = 0; i < parent.length; i++) {\\n containersModel.push(parent[i].items);\\n }\\n return containersModel;\\n })(),\\n nameSpace: \\'cells\\'\\n });\\n }, 0);\\n $scope.items = [{\\n items: [{\\n content: \\'Item a1\\'\\n }, {\\n content: \\'Item a2\\'\\n }, {\\n content: \\'Item a3\\'\\n }, {\\n content: \\'Item a4\\'\\n }]\\n }, {\\n items: [{\\n content: \\'Item b1\\'\\n }, {\\n content: \\'Item b2\\'\\n }, {\\n content: \\'Item b3\\'\\n }, {\\n content: \\'Item b4\\'\\n }]\\n }, {\\n items: [{\\n content: \\'Item c1\\'\\n }, {\\n content: \\'Item c2\\'\\n }, {\\n content: \\'Item c3\\'\\n }, {\\n content: \\'Item c4\\'\\n }]\\n }];\\n }])\\n
\\n
\\n\\n \\n // HTML:\\n <div class=\\'containerVertical\\'>\\n <div ng-repeat="item in items">\\n {{item.content}}\\n </div>\\n </div>\\n\\n // JS:\\n dragularService($element.children());\\n $scope.items = [{\\n content: \\'Try to add or remove some elements (click on +- buttons), you will see that it is not problem for dragular.\\'\\n },{\\n content: \\'Item 2\\'\\n },{\\n content: \\'Item 3\\'\\n },{\\n content: \\'Item 4\\'\\n }];\\n
\\n
\\n Move stuff between these two filtered containers. You can play with filter inputs to see that everything goes right.\\n
\\n Please notify the getFilteredModel function, it is necessery for not replacing the initial array object with new filtered one!
Items1:\\n\\n
{{items1 | json}}
Items2:\\n\\n
{{items2 | json}}
\\n\\n\\n// JS\\n .controller(\\'NgRepeatFilteredWithModel\\', [\\'$scope\\', \\'$element\\', \\'dragularService\\', \\'$filter\\', function TodoCtrl($scope, $element, dragularService, $filter) {\\n $scope.items1 = [{\\n content: \\'Move me, but you can only drop me in one of these containers.\\'\\n }, {\\n content: \\'If you try to drop me somewhere other than these containers, I\\\\\\'ll just come back.\\'\\n }, {\\n content: \\'Apple 3\\'\\n }, {\\n content: \\'Orange 4\\'\\n }, {\\n content: \\'Orange 5\\'\\n }, {\\n content: \\'Apple 6\\'\\n }, {\\n content: \\'Apple 7\\'\\n }, {\\n content: \\'Apple 8\\'\\n }];\\n $scope.items2 = [{\\n content: \\'Apple 9\\'\\n }, {\\n content: \\'Orange 10\\'\\n }, {\\n content: \\'Orange 11\\'\\n }, {\\n content: \\'Apple 12\\'\\n }, {\\n content: \\'Orange 13\\'\\n }, {\\n content: \\'Apple 14\\'\\n }];\\n $scope.filter1query = \\'Orange\\';\\n $scope.filter2query = \\'Orange\\';\\n $scope.filteredModel1 = [];\\n $scope.filteredModel2 = [];\\n $scope.getFilteredModel = function (filteredModel, items, filterQuery) {\\n filteredModel.length = 0;\\n /*\\n * Following one-liner is same like:\\n * var filteredModelTemp = $filter(\\'filter\\')(items, filterQuery);\\n * angular.forEach(filteredModelTemp, function(item){\\n * filteredModel.push(item);\\n * });\\n * Or like:\\n * var filteredModelTemp = $filter(\\'filter\\')(items, filterQuery);\\n * for(var i; i < filteredModelTemp.length; i++){\\n * filteredModel.push(filteredModelTemp[i]);\\n * }\\n *\\n * You cannot just assign filtered array to filteredModel like this:\\n * filteredModel = $filter(\\'filter\\')(items, filterQuery);\\n * Because you would replace the array object you provide to dragular with new one.\\n * So dragular will continue to use the one it was provided on init.\\n * Hopefully I make it clear. :)\\n */\\n [].push.apply(filteredModel, $filter(\\'filter\\')(items, filterQuery));\\n return filteredModel;\\n };\\n var containers = $element.children().eq(1).children();\\n dragularService.cleanEnviroment();\\n dragularService([containers[0],containers[1]],{\\n containersModel: [$scope.items1, $scope.items2],\\n containersFilteredModel: [$scope.filteredModel1, $scope.filteredModel2]\\n });\\n }]);\\n\\n
\\n\\n<!-- HTML -->\\n <div class=\\'wrapper\\' ng-controller="NgRepeatFilteredWithModel">\\n <div class="tableRow">\\n <div class=\\'containerVertical\\'>\\n <input ng-model="filter1query" style="margin:10px 10px">\\n </div>\\n <div class=\\'containerVertical\\'>\\n <input ng-model="filter2query" style="margin:10px 10px">\\n </div>\\n </div>\\n <div class=\\'tableRow\\'>\\n <div class=\\'containerVertical\\'>\\n <div ng-repeat="item in getFilteredModel(filteredModel1, items1, filter1query)">{{item.content}}</div>\\n </div>\\n <div class=\\'containerVertical\\'>\\n <div ng-repeat="item in getFilteredModel(filteredModel2, items2, filter2query)">{{item.content}}</div>\\n </div>\\n </div>\\n <div class="tableRow">\\n <div class=\\'containerVertical\\'>\\n <pre>Items1:\\n <br/>{{items1 | json}}</pre>\\n </div>\\n <div class=\\'containerVertical\\'>\\n <pre>Items2:\\n <br/>{{items2 | json}}</pre>\\n </div>\\n </div>\\n </div>\\n
\\n
\\n \\n // HTML:\\n <div class=\\'wrapper\\' ng-controller="NgRepeatWithModel">\\n <div class=\\'containerVertical\\'>\\n <div ng-repeat="item in items">\\n {{item.content}}\\n <button class=\\'cursorDefault\\' ng-click="addItem()">+</button>\\n <button class=\\'cursorDefault\\' ng-click="removeItem()">x</button>\\n </div>\\n </div>\\n </div>\\n
\\n
\\n \\n \\n // JS:\\n controller(\\'NgRepeatWithModel\\', [\\'$scope\\', \\'$element\\', \\'dragularService\\', function TodoCtrl($scope, $element, dragularService) {\\n $scope.items = [{\\n content: \\'Try to add or remove some elements (click on +- buttons), you will see that it is not problem for dragular.\\'\\n }, {\\n content: \\'Item 2\\'\\n }, {\\n content: \\'Item 3\\'\\n }, {\\n content: \\'Item 4\\'\\n }];\\n dragularService($element.children().eq(0).children(), {containersModel: $scope.items});\\n $scope.addItem = function addItem() {\\n var index = $scope.items.indexOf(this.item) + 1;\\n $scope.items.splice(index, 0, {\\n content: this.item.content + \\'-copy\\'\\n });\\n };\\n $scope.removeItem = function removeItem() {\\n var index = $scope.items.indexOf(this.item);\\n $scope.items.splice(index, 1);\\n };\\n }])\\n
\\n
\\n\\n \\n dragularService([document.getElementById(single)], { removeOnSpill: true });\\n
\\n
\\n Items1:\\n\\n
{{items1 | json}}
Items2:\\n\\n
{{items2 | json}}
\\n\\n\\n// JS\\n .controller(\\'RemoveOnSpillWithModel\\', [\\'$scope\\', \\'$element\\', \\'dragularService\\', function TodoCtrl($scope, $element, dragularService) {\\n $scope.items1 = [{\\n content: \\'Move me, but you can only drop me in containers.\\'\\n }, {\\n content: \\'If you try to drop me somewhere other than containers, I\\\\\\'ll die a fiery death.\\'\\n }, {\\n content: \\'Item 3\\'\\n }, {\\n content: \\'Item 4\\'\\n }];\\n $scope.items2 = [{\\n content: \\'You can drop me in the left container.\\'\\n }, {\\n content: \\'Item 6\\'\\n }, {\\n content: \\'Item 7\\'\\n }, {\\n content: \\'Item 8\\'\\n }];\\n var containers = $element.children().eq(0).children();\\n dragularService.cleanEnviroment();\\n dragularService([containers[0],containers[1]],{\\n containersModel: [$scope.items1, $scope.items2],\\n removeOnSpill: true\\n });\\n }])\\n
\\n\\n<!-- HTML -->\\n<div class=\\'wrapper\\' ng-controller="Basic">\\n <div class=\\'tableRow\\'>\\n <div class=\\'containerVertical\\'>\\n <div ng-repeat="item in items1">{{item.content}}</div>\\n </div>\\n <div class=\\'containerVertical\\'>\\n <div ng-repeat="item in items2">{{item.content}}</div>\\n </div>\\n </div>\\n <div class="tableRow">\\n <div class="container">\\n <div>Items1:\\n <br/>{{items1 | json}}</div>\\n </div>\\n <div class="container">\\n <div>Items2:\\n <br/>{{items2 | json}}</div>\\n </div>\\n </div>\\n</div>\\n
\\n
\\n \\n dragularService([document.getElementById(left), document.getElementById(right)], { revertOnSpill: true });\\n
\\n
\\n \\n \\n// JS\\ncontroller(\\'ScrollingDrag\\', [\\'$interval\\', \\'$element\\', \\'dragularService\\', function TodoCtrl($interval, $element, dragularService) {\\n\\n\\n var timer,\\n leftScrollContainer = document.getElementById(\\'leftScroll\\'),\\n rightScrollContainer = document.getElementById(\\'rightScroll\\'),\\n leftTopBar = document.getElementById(\\'leftTopBar\\'),\\n leftBottomBar = document.getElementById(\\'leftBottomBar\\'),\\n rightTopBar = document.getElementById(\\'rightTopBar\\'),\\n rightBottomBar = document.getElementById(\\'rightBottomBar\\');\\n\\n dragularService.cleanEnviroment();\\n dragularService([leftScrollContainer, rightScrollContainer]);\\n\\n registerEvents(leftTopBar, leftScrollContainer, -5);\\n registerEvents(leftBottomBar, leftScrollContainer, 5);\\n registerEvents(rightTopBar, rightScrollContainer, -5);\\n registerEvents(rightBottomBar, rightScrollContainer, 5);\\n\\n function registerEvents(bar, container, inc, speed) {\\n if (!speed) {\\n speed = 20;\\n }\\n angular.element(bar).on(\\'dragularenter\\', function() {\\n container.scrollTop += inc;\\n timer = $interval(function moveScroll() {\\n container.scrollTop += inc;\\n }, speed);\\n });\\n angular.element(bar).on(\\'dragularleave dragularrelease\\', function() {\\n $interval.cancel(timer);\\n });\\n }\\n }])\\n
\\n
\\n \\n \\n<!-- HTML -->\\n<div ng-controller="ScrollingDrag">\\n <div class="containerVertical scrollingDrag">\\n <div class="scrollBar" id="leftTopBar">up</div>\\n <div id="leftScroll" class="scrollingDragInner">\\n <div>Item 1</div>\\n <div>Item 2</div>\\n ...\\n </div>\\n <div class="scrollBar" id="leftBottomBar">down</div>\\n </div>\\n <div class="containerVertical scrollingDrag">\\n <div class="scrollBar" id="rightTopBar">up</div>\\n <div id="rightScroll" class="scrollingDragInner">\\n <div>Item 1</div>\\n <div>Item 2</div>\\n ...\\n </div>\\n <div class="scrollBar" id="rightBottomBar">down</div>\\n </div>\\n </div>\\n
\\n
\\n \\n \\n// CSS\\n.scrollingDrag {\\n width: 45%;\\n display: inline-block;\\n}\\n\\n.scrollingDragInner {\\n max-height: 200px;\\n overflow-y: auto;\\n}\\n\\n#rightTopBar,\\n#rightBottomBar {\\n background: transparent;\\n position: relative;\\n height: 20px;\\n}\\n\\n#rightTopBar {\\n top: 10px;\\n}\\n\\n#rightBottomBar {\\n bottom: 10px;\\n}\\n\\ndiv.scrollBar {\\n background: yellow;\\n text-align: center;\\n padding: 1px;\\n}\\n\\n
\\n
\\n\\n \\n
\\n \\n \\nBrowser support includes every sane browser and **IE7+**. _(Granted you polyfill the functional `Array` methods in ES5)_
\\nI 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.
\\nActual version 4.4.6 is based on dragula 3.6.3 and tested with angular 1.5.5.
\\nIt's important to us that you feel you can contribute towards the evolution of Dragular. This can take many forms: from helping to fix bugs or improve the docs, to adding in new features to the source. This guide should help you in making that process as smooth as possible.
\\nBefore contributing, please read the code of conduct.
\\nGitHub Issues is the place to report bugs you may have found in either the core library or any of the examples that are part of the repository. When submitting a bug please do the following:
\\n1. Search for existing issues. Your bug may have already been fixed or addressed in a development branch version of Dragular, so be sure to search the issues first before putting in a duplicate issue.
\\n2. Not sure if it's a bug?. Then please ask via issues and tag it [question].
\\n3. Create an isolated and reproducible test case. If you are reporting a bug, make sure you also have a minimal, runnable, code example that reproduces the problem you have.
\\n4. Include a live example. After narrowing your code down to only the problem areas, make use of Codepen, jsBin, or a link to your live site so that we can view a live example of the problem. (you can start by forking this codepen)
\\n5. Share as much information as possible. Include browser version affected, your OS, version of the library, steps to reproduce, etc. "X isn't working!!!1!" will probably just be closed.
\\nThe dev branch of Dragular is our 'current working' version. It is always ahead of the master branch in terms of features and fixes. However it's also bleeding-edge and experimental and we cannot and do not guarantee it will compile or work for you. Very often we have to break things for a few days while we rebuild and patch. So by all means please export the dev branch and contribute towards it, indeed that is where all Pull Requests should be sent, but do so understanding the API may change beneath you.
\\nTo take advantage of our npm build script and jshint config it will be easiest for you if you have node.js installed locally.
\\nYou can download node.js from nodejs.org.
\\nAfter that you can clone the repository and run npm i
inside the cloned folder. This will install dependencies necessary for building the project. For development workflow automation dragular uses gulp >= 3.9.0
. Before starting development, make sure that gulp
is installed on your machine globally: npm i -g gulp
.
There are several gulp tasks that are used for generating different builds:
\\ngulp dev
- Serves files with BrowserSync server, watches & automatically refreshes connected browsers on changes, generates non-minified but concatenated styles & scripts from the dragular source.gulp dev:docs
- Does exactly the same as gulp dev
, except it works with the documentation source.gulp build
- Concatenates and minifies dragular source files.gulp build:docs
- Concatenates and minifies documentation source files.gulp lint
& gulp lint:docs
- Lint JavaScript files.Once that is ready, make your changes and submit a Pull Request:
\\nSend Pull Requests to the dev
branch. All Pull Requests must be sent to the dev
branch, master
is the latest release and PRs to that branch will be closed.
Ensure changes are jshint validated. Our JSHint configuration file is provided in the repository and you should check against it before submitting.
\\nOnly commit relevant changes. Don't include changes that are not directly relevant to the fix you are making. The more focused a PR is, the faster it will get attention and be merged. Extra files changing only whitespace or trash files will likely get your PR closed.
\\nDependencies for building from source and running tests:
\\nIf your PR is doing little more than changing the Dragular source code into a format / coding style that you prefer then we will automatically close it. All PRs must adhere to the coding style already set-out across the lines of code in Dragular. Your personal preferences for how things should "look" or be structured do not apply here, sorry. PRs should fix bugs, fix documentation or add features. No changes for the sake of change.
\\nThat is fine too. While Pull Requests are the best thing in the world for us, they are not the only way to help. You're welcome to post fixes to our forum or even just email them to us. All we ask is that you still adhere to the guidelines presented here re: JSHint, etc.
\\n\");}]);\n\n/***/ })\n/******/ ])\n});\n;"]} \ No newline at end of file +{"version":3,"sources":["examples.js"],"names":["root","factory","exports","module","define","amd","a","i","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","dragular","angular","examplesRouter","BasicCtrl","BasicModelCtrl","BoundingBoxCtrl","BoundingBoxLockXCtrl","BoundingBoxLockYCtrl","CopyCtrl","CopyModelCtrl","CustomClassesCtrl","DifferentOptionsModelCtrl","DirectiveCtrl","DirectiveModelCtrl","DragOverEventsCtrl","EventsCtrl","HandleCtrl","IsContainerModelCtrl","NameSpacesCtrl","NestedNgRepeatCtrl","NestedNgRepeatWithModelCtrl","NgRepeatCtrl","NgRepeatFilteredWithModelCtrl","NgRepeatWithModelCtrl","RemoveOnSpillCtrl","RemoveOnSpillWithModelCtrl","RevertOnSpillCtrl","ScrollingDragCtrl","NestedRepeatsWithCustomDirective","config","controller","$scope","examplesList","template","link","title","highlightCode","document","getElementsByTagName","length","codeBlocks","hljs","highlightBlock","rowOffcanvas","toggleSidebar","element","getElementById","toggleClass","dragularDirective","dragularService","directive","restrict","iElm","iAttrs","tryJson","json","JSON","parse","e","options","$eval","dragularModel","containersModel","scope","dragularNameSpace","nameSpace","split","dragularOnInit","onInit","$inject","shared","classesCache","containersCtx","containers","mirror","source","item","copy","sourceItem","sourceModel","sourceFilteredModel","target","targetCtx","targetModel","lastDropTarget","offsetX","offsetY","moveX","moveY","offsetXr","offsetYb","clientX","clientY","mirrorWidth","mirrorHeight","initialSibling","currentSibling","initialIndex","currentIndex","tempModel","dragOverEvents","lastElementBehindCursor","grabbed","$rootScope","$compile","service","arg0","arg1","processServiceArguments","arguments","_isArray","isElement","initialContainers","querySelectorAll","o","copyOptions","extendOptions","tmp","extend","defaultOptions","classes","defaultClasses","eventNames","defaultEventNames","processOptionsObject","boundingBox","sanitizeContainers","containersFilteredModel","forEach","cont","len","getContainers","Error","indexOf","push","getContainersModel","fm","registerEvents","remove","op","regEvent","_docElm","release","container","grab","name","eventName","_doc","createEvent","initEvent","createEventObject","eventType","whichMouseButton","metaKey","ctrlKey","context","canStart","eventualMovements","type","isInput","focus","preventDefault","startBecauseMouseMoved","drake","dragging","originalEvent","g","ignoreInputTextSelection","getCoord","elementBehindCursor","elementFromPoint","movements","end","start","direction","getParent","parent","parentNode","parentHeight","offsetHeight","parentWidth","offsetWidth","childHeight","clientHeight","childWidth","clientWidth","offset","getOffset","left","top","right","bottom","renderMirrorImage","addClass","transit","style","drag","preventGrabbed","handle","isContainer","invalid","moves","nextEl","clone","$emit","dragularcloned","containerIndex","domIndexOf","dragulardrag","manualStart","rect","getBoundingClientRect","cloneNode","width","height","getRectWidth","getRectHeight","mirrorContainer","appendChild","body","unselectable","scrollContainer","drop","ungrab","moved","notify","removeOnSpill","spillOver","spillOut","pageX","pageY","offsetBox","x","y","lockY","lockX","getElementBehindPoint","dropTarget","findDropTarget","changed","fireEvent","dragularenter","dragularleave","copySortSource","removeChild","reference","immediate","getImmediateChild","getReference","revertOnSpill","insertBefore","dragularshadow","accepted","initial","isInitialPlacement","getTargetCtx","_isFunction","accepts","isContainerAccepts","canBeAccepted","rmClass","hide","s","sibling","undefined","outside","el","children","horizontal","inside","resolve","after","point","state","className","isContainerModel","opt","_getContainers","containersType","to2d","cancel","revert","reverts","dragularcancel","cleanup","dragularrelease","afterDrop","dragulardrop","dropIndex","compileItemOnDrop","$applyAsync","content","splice","dropElmModel","dontCopyModel","dragularremove","removeMirrorImage","dragularout","dragulardragend","destroy","removeContainers","makeArray","index","addContainers","before","scrollTop","deltaY","stopPropagation","depSanitize","getBool","dragularover","never","getEmptyArray","always","sanitizeContainersModel","evaluated","fn","touch","mouseup","mousedown","mousemove","pointers","microsoft","$el","addEventListener","opConvert","on","off","passive","navigator","pointerEnabled","msPointerEnabled","all","startIndex","Array","prototype","slice","touches","which","buttons","button","getScroll","scrollProp","offsetProp","window","scrollLeft","manually","nextSibling","nodeType","nextElementSibling","obj","HTMLElement","nodeName","lookupClass","cached","lastIndex","RegExp","current","test","replace","trim","getEventHost","targetTouches","changedTouches","coord","host","missMap","tagName","isEditable","contentEditable","child","extra","dispatchEvent","prop","args","apply","documentElement","isArray","isFunction","cleanEnviroment","$stateProvider","$urlRouterProvider","otherwise","timer","ctrl","$state","$stateParams","$timeout","go","url","templateUrl","$element","items1","items2","eq","containerLeft","querySelector","containerRight","dragularOptions","parentElement","removeClass","notContainer","getElementsByClassName","myFn","$on","Events2Ctrl","classList","contains","cartModel","removeItem","items","parentContainers","nestedContainers","addItem","$filter","filter1query","filter2query","filteredModel1","filteredModel2","getFilteredModel","filteredModel","filterQuery","$interval","bar","inc","speed","leftScrollContainer","rightScrollContainer","leftTopBar","leftBottomBar","rightTopBar","rightBottomBar","questions","text","points","order","age","QuestionsDirective","question","QuestionsController","run","$templateCache","put"],"mappings":"CAAA,SAA2CA,EAAMC,GAChD,GAAsB,gBAAZC,UAA0C,gBAAXC,QACxCA,OAAOD,QAAUD,QACb,IAAqB,kBAAXG,SAAyBA,OAAOC,IAC9CD,UAAWH,OACP,CACJ,GAAIK,GAAIL,GACR,KAAI,GAAIM,KAAKD,IAAuB,gBAAZJ,SAAuBA,QAAUF,GAAMO,GAAKD,EAAEC,KAErEC,KAAM,WACT,MAAgB,UAAUC,GAKhB,QAASC,GAAoBC,GAG5B,GAAGC,EAAiBD,GACnB,MAAOC,GAAiBD,GAAUT,OAGnC,IAAIC,GAASS,EAAiBD,IAC7BT,WACAW,GAAIF,EACJG,QAAQ,EAUT,OANAL,GAAQE,GAAUI,KAAKZ,EAAOD,QAASC,EAAQA,EAAOD,QAASQ,GAG/DP,EAAOW,QAAS,EAGTX,EAAOD,QAvBf,GAAIU,KAqCJ,OATAF,GAAoBM,EAAIP,EAGxBC,EAAoBO,EAAIL,EAGxBF,EAAoBQ,EAAI,GAGjBR,EAAoB,KAK/B,SAAUP,EAAQD,EAASQ,GAGhC,YAIA,IAAIS,GAAWT,EAAoB,EAEnCU,SACEjB,OAAO,eAAgBgB,EAAU,YAAa,aAEhD,IAAIE,GAAiBX,EAAoB,GACrCY,EAAYZ,EAAoB,GAChCa,EAAiBb,EAAoB,GACrCc,EAAkBd,EAAoB,GACtCe,EAAuBf,EAAoB,GAC3CgB,EAAuBhB,EAAoB,GAC3CiB,EAAWjB,EAAoB,IAC/BkB,EAAgBlB,EAAoB,IACpCmB,EAAoBnB,EAAoB,IACxCoB,EAA4BpB,EAAoB,IAChDqB,EAAgBrB,EAAoB,IACpCsB,EAAqBtB,EAAoB,IACzCuB,EAAqBvB,EAAoB,IACzCwB,EAAaxB,EAAoB,IACjCyB,EAAazB,EAAoB,IACjC0B,EAAuB1B,EAAoB,IAC3C2B,EAAiB3B,EAAoB,IACrC4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) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse {\n\t\tvar a = factory();\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n\n\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* global angular, hljs */\n\t'use strict';\n\n\t// var angular = require('angular');\n\n\tvar dragular = __webpack_require__(1);\n\n\tangular\n\t\t.module('examplesApp', [dragular, 'templates', 'ui.router']);\n\n\tvar examplesRouter = __webpack_require__(4);\n\tvar BasicCtrl = __webpack_require__(5);\n\tvar BasicModelCtrl = __webpack_require__(6);\n\tvar BoundingBoxCtrl = __webpack_require__(7);\n\tvar BoundingBoxLockXCtrl = __webpack_require__(8);\n\tvar BoundingBoxLockYCtrl = __webpack_require__(9);\n\tvar CopyCtrl = __webpack_require__(10);\n\tvar CopyModelCtrl = __webpack_require__(11);\n\tvar CustomClassesCtrl = __webpack_require__(12);\n\tvar DifferentOptionsModelCtrl = __webpack_require__(13);\n\tvar DirectiveCtrl = __webpack_require__(14);\n\tvar DirectiveModelCtrl = __webpack_require__(15);\n\tvar DragOverEventsCtrl = __webpack_require__(16);\n\tvar EventsCtrl = __webpack_require__(17);\n\tvar HandleCtrl = __webpack_require__(18);\n\tvar IsContainerModelCtrl = __webpack_require__(19);\n\tvar NameSpacesCtrl = __webpack_require__(20);\n\tvar NestedNgRepeatCtrl = __webpack_require__(21);\n\tvar NestedNgRepeatWithModelCtrl = __webpack_require__(22);\n\tvar NgRepeatCtrl = __webpack_require__(23);\n\tvar NgRepeatFilteredWithModelCtrl = __webpack_require__(24);\n\tvar NgRepeatWithModelCtrl = __webpack_require__(25);\n\tvar RemoveOnSpillCtrl = __webpack_require__(26);\n\tvar RemoveOnSpillWithModelCtrl = __webpack_require__(27);\n\tvar RevertOnSpillCtrl = __webpack_require__(28);\n\tvar ScrollingDragCtrl = __webpack_require__(29);\n\tvar NestedRepeatsWithCustomDirective = __webpack_require__(30);\n\t__webpack_require__(31);\n\n\t/**\n\t * Module Example App\n\t *\n\t * DEMO app for dragular https://github.com/luckylooke/dragular\n\t */\n\n\tangular\n\t .module('examplesApp')\n\t .config(examplesRouter)\n\t .controller('Basic', BasicCtrl)\n\t .controller('BasicModel', BasicModelCtrl)\n\t .controller('BoundingBox', BoundingBoxCtrl)\n\t .controller('BoundingBoxLockX', BoundingBoxLockXCtrl)\n\t .controller('BoundingBoxLockY', BoundingBoxLockYCtrl)\n\t .controller('Copy', CopyCtrl)\n\t .controller('CopyModel', CopyModelCtrl)\n\t .controller('CustomClasses', CustomClassesCtrl)\n\t .controller('DifferentOptionsModel', DifferentOptionsModelCtrl)\n\t .controller('Directive', DirectiveCtrl)\n\t .controller('DirectiveModel', DirectiveModelCtrl)\n\t .controller('DragOverEvents', DragOverEventsCtrl)\n\t .controller('Events', EventsCtrl[0])\n\t .controller('Events2', EventsCtrl[1])\n\t .controller('Handle', HandleCtrl)\n\t .controller('IsContainerModel', IsContainerModelCtrl)\n\t .controller('NameSpaces', NameSpacesCtrl)\n\t .controller('NestedNgRepeat', NestedNgRepeatCtrl)\n\t .controller('NestedNgRepeatWithModel', NestedNgRepeatWithModelCtrl)\n\t .controller('NgRepeat', NgRepeatCtrl)\n\t .controller('NgRepeatFilteredWithModel', NgRepeatFilteredWithModelCtrl)\n\t .controller('NgRepeatWithModel', NgRepeatWithModelCtrl)\n\t .controller('RemoveOnSpill', RemoveOnSpillCtrl)\n\t .controller('RemoveOnSpillWithModel', RemoveOnSpillWithModelCtrl)\n\t .controller('RevertOnSpill', RevertOnSpillCtrl)\n\t .controller('ScrollingDrag', ScrollingDragCtrl)\n\t .controller('NestedRepeatsWithCustomDirective', NestedRepeatsWithCustomDirective)\n\t .controller('ExAppCtrl', ['$scope', function($scope) {\n\t $scope.examplesList = [{\n\t template: 'docsInstall/docsInstall.html',\n\t link: 'docsInstall',\n\t title: 'Installation'\n\t },{\n\t template: 'exampleBasic/exampleBasic.html',\n\t link: 'exampleBasic',\n\t title: 'Basic'\n\t },{\n\t template: 'exampleBasicWithModel/exampleBasicWithModel.html',\n\t link: 'exampleBasicWithModel',\n\t title: 'Basic - with model'\n\t },{\n\t template: 'exampleDifferentOptionsWithModel/exampleDifferentOptionsWithModel.html',\n\t link: 'exampleDifferentOptionsWithModel',\n\t title: 'Different options - with model'\n\t }, {\n\t template: 'exampleDirective/exampleDirective.html',\n\t link: 'exampleDirective',\n\t title: 'Directive'\n\t }, {\n\t template: 'exampleDirectiveWithModel/exampleDirectiveWithModel.html',\n\t link: 'exampleDirectiveWithModel',\n\t title: 'Directive - with model'\n\t }, {\n\t template: 'exampleEvents/exampleEvents.html',\n\t link: 'exampleEvents',\n\t title: 'Events'\n\t }, {\n\t template: 'exampleRemoveOnSpill/exampleRemoveOnSpill.html',\n\t link: 'exampleRemoveOnSpill',\n\t title: 'Remove on spill'\n\t }, {\n\t template: 'exampleRemoveOnSpillWithModel/exampleRemoveOnSpillWithModel.html',\n\t link: 'exampleRemoveOnSpillWithModel',\n\t title: 'Remove on spill - with model'\n\t }, {\n\t template: 'exampleRevertOnSpill/exampleRevertOnSpill.html',\n\t link: 'exampleRevertOnSpill',\n\t title: 'Revert on spill'\n\t }, {\n\t template: 'exampleCopy/exampleCopy.html',\n\t link: 'exampleCopy',\n\t title: 'Copy'\n\t }, {\n\t template: 'exampleCopyWithModel/exampleCopyWithModel.html',\n\t link: 'exampleCopyWithModel',\n\t title: 'Copy - with model'\n\t }, {\n\t template: 'exampleHandle/exampleHandle.html',\n\t link: 'exampleHandle',\n\t title: 'Handle'\n\t }, {\n\t template: 'exampleIsContainerWithModel/exampleIsContainerWithModel.html',\n\t link: 'exampleIsContainerWithModel',\n\t title: 'isContainer - with model'\n\t }, {\n\t template: 'exampleCustomClasses/exampleCustomClasses.html',\n\t link: 'exampleCustomClasses',\n\t title: 'Custom classes'\n\t }, {\n\t template: 'exampleNameSpaces/exampleNameSpaces.html',\n\t link: 'exampleNameSpaces',\n\t title: 'NameSpaces'\n\t }, {\n\t template: 'exampleDragOverEvents/exampleDragOverEvents.html',\n\t link: 'exampleDragOverEvents',\n\t title: 'Drag-over events'\n\t }, {\n\t template: 'exampleBoundingBox/exampleBoundingBox.html',\n\t link: 'exampleBoundingBox',\n\t title: 'BoundingBox'\n\t }, {\n\t template: 'exampleBoundingBoxLockX/exampleBoundingBoxLockX.html',\n\t link: 'exampleBoundingBoxLockX',\n\t title: 'BoundingBox + LockX'\n\t }, {\n\t template: 'exampleBoundingBoxLockY/exampleBoundingBoxLockY.html',\n\t link: 'exampleBoundingBoxLockY',\n\t title: 'BoundingBox + LockY'\n\t }, {\n\t template: 'exampleNgRepeat/exampleNgRepeat.html',\n\t link: 'exampleNgRepeat',\n\t title: 'ngRepeat'\n\t }, {\n\t template: 'exampleNgRepeatWithModel/exampleNgRepeatWithModel.html',\n\t link: 'exampleNgRepeatWithModel',\n\t title: 'ngRepeat - with model'\n\t }, {\n\t template: 'exampleNgRepeatFilteredWithModel/exampleNgRepeatFilteredWithModel.html',\n\t link: 'exampleNgRepeatFilteredWithModel',\n\t title: 'Filtered ngRepeat - with model'\n\t }, {\n\t template: 'exampleNestedNgRepeat/exampleNestedNgRepeat.html',\n\t link: 'exampleNestedNgRepeat',\n\t title: 'Nested ngRepead'\n\t }, {\n\t template: 'exampleNestedNgRepeatWithModel/exampleNestedNgRepeatWithModel.html',\n\t link: 'exampleNestedNgRepeatWithModel',\n\t title: 'Nested ngRepead - with model'\n\t }, {\n\t template: 'exampleScrollingDrag/exampleScrollingDrag.html',\n\t link: 'exampleScrollingDrag',\n\t title: 'Scrolling drag'\n\t }, {\n\t template: 'exampleSNestedRepeatsWithCustomDirective/exampleNestedRepeatsWithCustomDirective.html',\n\t link: 'exampleNestedRepeatsWithCustomDirective',\n\t title: 'Nested repeats with custom directive'\n\t }];\n\n\t $scope.highlightCode = function () {\n\t if(document.getElementsByTagName('code').length){\n\t var codeBlocks = document.getElementsByTagName('code');\n\t for (var i = codeBlocks.length - 1; i >= 0; i--) {\n\t hljs.highlightBlock(codeBlocks[i]);\n\t }\n\t }\n\t };\n\n\t var rowOffcanvas;\n\t $scope.toggleSidebar = function toggleSidebar () {\n\t if(!rowOffcanvas){\n\t rowOffcanvas = angular.element(document.getElementById('rowOffcanvas'));\n\t }\n\t rowOffcanvas.toggleClass('active');\n\t };\n\n\t }]);\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* global angular */\n\t'use strict';\n\tvar dragularDirective = __webpack_require__( 2 );\n\tvar dragularService = __webpack_require__( 3 );\n\n\t/**\n\t * Dragular 4.4.6 by Luckylooke https://github.com/luckylooke/dragular\n\t * Angular version of dragula https://github.com/bevacqua/dragula\n\t */\n\tmodule.exports = 'dragularModule';\n\n\tangular\n\t\t.module( 'dragularModule', [] )\n\t\t.factory( 'dragularService', dragularService )\n\t\t.directive( 'dragular', dragularDirective );\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\t/**\n\t * dragular Directive by Luckylooke https://github.com/luckylooke/dragular\n\t * Angular version of dragula https://github.com/bevacqua/dragula\n\t */\n\n\tvar dragular = function ( dragularService ) {\n\t\treturn {\n\t\t\trestrict: 'A',\n\t\t\tlink: function ( $scope, iElm, iAttrs ) {\n\n\t\t\t\tvar options = $scope.$eval( iAttrs.dragular ) || tryJson( iAttrs.dragular ) || {};\n\n\t\t\t\tfunction tryJson( json ) {\n\t\t\t\t\ttry { // I dont like try catch solutions but I havent find sattisfying way of chcecking json validity.\n\t\t\t\t\t\treturn JSON.parse( json );\n\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( iAttrs.dragularModel ) {\n\t\t\t\t\toptions.containersModel = iAttrs.dragularModel;\n\t\t\t\t\tif ( !options.scope ){\n\t\t\t\t\t\toptions.scope = $scope;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( iAttrs.dragularNameSpace ) {\n\t\t\t\t\toptions.nameSpace = iAttrs.dragularNameSpace.split( ' ' );\n\t\t\t\t}\n\n\t\t\t\tif ( iAttrs.dragularOnInit ) {\n\t\t\t\t\toptions.onInit = $scope.$eval( iAttrs.dragularOnInit );\n\t\t\t\t}\n\n\t\t\t\tdragularService( iElm[ 0 ], options );\n\t\t\t}\n\t\t};\n\t};\n\n\tdragular.$inject = [ 'dragularService' ];\n\n\tmodule.exports = dragular;\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports) {\n\n\t/* global angular */\n\t'use strict';\n\n\t/**\n\t * dragular Service by Luckylooke https://github.com/luckylooke/dragular\n\t * Angular version of dragula https://github.com/bevacqua/dragula\n\t */\n\n\tvar shared = { // sahred object between all service instances\n\t\tclassesCache: {}, // classes lookup cache\n\t\tcontainersCtx: {}, // containers model\n\t\tcontainers: {}, // containers\n\t\tmirror: null, // mirror image\n\t\tsource: null, // source container\n\t\titem: null, // item being dragged\n\t\tcopy: null, // copy flag\n\t\tsourceItem: null, // item originaly dragged if copy is enabled\n\t\tsourceModel: null, // source container model\n\t\tsourceFilteredModel: null, // source container filtered model if relevant\n\t\ttarget: null, // droppable container under drag item\n\t\ttargetCtx: null, // target container context\n\t\ttargetModel: null, // target container model\n\t\tlastDropTarget: null, // last container item was over\n\t\toffsetX: null, // reference x\n\t\toffsetY: null, // reference y\n\t\tmoveX: null, // reference move x\n\t\tmoveY: null, // reference move y\n\t\toffsetXr: null, // reference x right for boundingBox feature\n\t\toffsetYb: null, // reference y bottom for boundingBox feature\n\t\tclientX: null, // cache client x, init at grab, update at drag\n\t\tclientY: null, // cache client y, init at grab, update at drag\n\t\tmirrorWidth: null, // mirror width for boundingBox feature\n\t\tmirrorHeight: null, // mirror height for boundingBox feature\n\t\tinitialSibling: null, // reference sibling when grabbed\n\t\tcurrentSibling: null, // reference sibling now\n\t\tinitialIndex: null, // reference model index when grabbed\n\t\tcurrentIndex: null, // reference model index now\n\t\ttempModel: null, // if o.isContainer is used, model can be provided as well, it is temporary saved here during drags\n\t\tdragOverEvents: {}, // drag over events fired on element behind cursor\n\t\tlastElementBehindCursor: null, // last element behind cursor\n\t\tgrabbed: null // holds mousedown context until first mousemove\n\t};\n\n\tvar dragularService = function ( $rootScope, $compile ) {\n\n\t\t// abbreviations\n\t\tvar _doc = document,\n\t\t\t_docElm = _doc.documentElement,\n\t\t\t_isArray = Array.isArray,\n\t\t\t_isFunction = angular.isFunction;\n\n\t\t// clean common/shared objects\n\t\tservice.cleanEnviroment = function cleanEnviroment() {\n\t\t\tshared.classesCache = {};\n\t\t\tshared.containersCtx = {};\n\t\t\tshared.containers = {};\n\t\t\tshared.mirror = undefined;\n\t\t};\n\n\t\tservice.shared = shared;\n\n\t\treturn service;\n\n\t\t// service definition\n\t\tfunction service( arg0, arg1 ) {\n\n\t\t\t// console.log('dragularService arg0, arg1', arg0, arg1);\n\n\t\t\tvar initialContainers = arg0 || [],\n\t\t\t\toptions = arg1 || {},\n\t\t\t\to, // shorthand for options\n\t\t\t\tg = getBool, // shorthand for getBool\n\n\t\t\t\t// defaults\n\t\t\t\tdefaultClasses = {\n\t\t\t\t\tmirror: 'gu-mirror',\n\t\t\t\t\thide: 'gu-hide',\n\t\t\t\t\tunselectable: 'gu-unselectable',\n\t\t\t\t\ttransit: 'gu-transit'\n\t\t\t\t},\n\t\t\t\tdefaultEventNames = {\n\t\t\t\t\t// drag-over DOM events\n\t\t\t\t\tdragularenter: 'dragularenter',\n\t\t\t\t\tdragularleave: 'dragularleave',\n\t\t\t\t\tdragularrelease: 'dragularrelease',\n\t\t\t\t\t// $scope events\n\t\t\t\t\tdragularcloned: 'dragularcloned',\n\t\t\t\t\tdragulardrag: 'dragulardrag',\n\t\t\t\t\tdragularcancel: 'dragularcancel',\n\t\t\t\t\tdragulardrop: 'dragulardrop',\n\t\t\t\t\tdragularremove: 'dragularremove',\n\t\t\t\t\tdragulardragend: 'dragulardragend',\n\t\t\t\t\tdragularshadow: 'dragularshadow',\n\t\t\t\t\tdragularover: 'dragularover',\n\t\t\t\t\tdragularout: 'dragularout'\n\t\t\t\t},\n\t\t\t\tdefaultOptions = { // options with defaults\n\t\t\t\t\tcopyOptions: false, // copy options object when provided\n\t\t\t\t\tclasses: defaultClasses, // classes used by dragular\n\t\t\t\t\teventNames: defaultEventNames, // event names used by dragular\n\t\t\t\t\tcontainers: false, // initial containers provided via options object (are provided via parameter by default)\n\t\t\t\t\tcontainersModel: false, // if provided, model will be synced with DOM\n\t\t\t\t\tcontainersFilteredModel: false, // if provided, dragular will handle filtered model cases\n\t\t\t\t\tisContainer: never, // potential target can be forced to be container by custom logic\n\t\t\t\t\tisContainerModel: getEmptyArray, // if isContainer function is provided, you can provide also respective model\n\t\t\t\t\tisContainerAccepts: always, // if isContainer function is provided, you can provide also respective accept function\n\t\t\t\t\tmoves: always, // can drag start?\n\t\t\t\t\taccepts: always, // can target accept dragged item? (target context used)\n\t\t\t\t\tcanBeAccepted: always, // can be dragged item accepted by target? (source context used)\n\t\t\t\t\tcopy: false, // dragged item will be copy of source? flag or function\n\t\t\t\t\tcopySortSource: false, // enable sorting in source when copying item\n\t\t\t\t\tdontCopyModel: false, // dont make copy of model when coping item (#61)\n\t\t\t\t\tinvalid: never, // target (in)validity function\n\t\t\t\t\trevertOnSpill: false, // item returns to original place\n\t\t\t\t\tremoveOnSpill: false, // item will be removed if not placed into valid target\n\t\t\t\t\tlockX: false, // lock movement into x-axis\n\t\t\t\t\tlockY: false, // lock movement into y-axis\n\t\t\t\t\tboundingBox: false, // lock movement inside this element boundaries\n\t\t\t\t\tmirrorContainer: _doc.body, // element for appending mirror\n\t\t\t\t\tignoreInputTextSelection: true, // text selection in inputs wont be considered as drag\n\t\t\t\t\tcompileItemOnDrop: false,\n\t\t\t\t\tonInit: false // function callback called after dragular initialisation and providing drake as first argument\n\t\t\t\t},\n\n\t\t\t\tdrake = {\n\t\t\t\t\tcontainers: shared.containers, // all containers\n\t\t\t\t\tcontainersCtx: shared.containersCtx, // all contexts to containers\n\t\t\t\t\tsanitizeContainersModel: depSanitize,\n\t\t\t\t\tsanitizeContainers: sanitizeContainers,\n\t\t\t\t\taddContainers: addContainers,\n\t\t\t\t\tremoveContainers: removeContainers,\n\t\t\t\t\tisContainer: isContainer,\n\t\t\t\t\tstart: manualStart,\n\t\t\t\t\tend: end,\n\t\t\t\t\tcancel: cancel,\n\t\t\t\t\tremove: remove,\n\t\t\t\t\tdestroy: destroy,\n\t\t\t\t\tdragging: false\n\t\t\t\t};\n\n\t\t\tprocessServiceArguments(); // both arguments (containers and options) are optional, this function handle this\n\t\t\textendOptions();\n\t\t\tprocessOptionsObject();\n\t\t\tregisterEvents();\n\n\t\t\tif ( o.onInit ) {\n\t\t\t\to.onInit( drake, o );\n\t\t\t}\n\t\t\treturn drake;\n\n\n\t\t\t// Function definitions: ==============================================================================================================\n\n\n\t\t\t// ====================================================================================================================================\n\t\t\t// Dragular service init functions: ---------------------------------------------------------------------------------------------------\n\t\t\t// ====================================================================================================================================\n\n\n\t\t\tfunction processServiceArguments() {\n\n\t\t\t\tif ( arguments.length === 1 && // if there is only one argument we need to distinguish if it is options object or container(s) reference\n\n\t\t\t\t\t!_isArray( arg0 ) && // array of containers elements\n\t\t\t\t\t!angular.isElement( arg0 ) && // one container element\n\t\t\t\t\t!arg0[ 0 ] && // array-like object with containers elements\n\t\t\t\t\ttypeof arg0 !== 'string' ) { // selector\n\t\t\t\t\t// then arg0 is options object\n\t\t\t\t\toptions = arg0 || {};\n\t\t\t\t\tinitialContainers = []; // containers are not provided on init\n\t\t\t\t}\n\t\t\t\telse if ( typeof arg0 === 'string' ) {\n\n\t\t\t\t\tinitialContainers = document.querySelectorAll( arg0 );\n\t\t\t\t}\n\n\t\t\t\to = options.copyOptions ? angular.copy( options ) : options;\n\t\t\t}\n\n\t\t\tfunction extendOptions() {\n\n\t\t\t\tvar tmp = angular.extend( {}, defaultOptions, o ); // tmp for keeping defaults untouched\n\t\t\t\tangular.extend( o, tmp ); // merge defaults back into options\n\n\t\t\t\tif ( o.classes ) {\n\n\t\t\t\t\ttmp = angular.extend( {}, defaultClasses, o.classes );\n\t\t\t\t\tangular.extend( o.classes, tmp );\n\t\t\t\t}\n\n\t\t\t\tif ( o.eventNames ) {\n\n\t\t\t\t\ttmp = angular.extend( {}, defaultEventNames, o.eventNames );\n\t\t\t\t\tangular.extend( o.eventNames, tmp );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction processOptionsObject() {\n\n\t\t\t\t// bounding box must be pure DOM element, not jQuery wrapper or something else..\n\t\t\t\tif ( !isElement( o.boundingBox ) ) {\n\t\t\t\t\to.boundingBox = false;\n\t\t\t\t}\n\n\t\t\t\t// initial containers provided via options are higher priority then by parameter\n\t\t\t\tif ( o.containers ) {\n\t\t\t\t\tinitialContainers = o.containers;\n\t\t\t\t}\n\n\t\t\t\t// sanitize initialContainers\n\t\t\t\to.containers = sanitizeContainers( initialContainers, false, o.scope );\n\n\t\t\t\t// sanitize o.containersModel\n\t\t\t\to.containersModel = sanitizeContainers( o.containersModel, true, o.scope );\n\n\t\t\t\t// sanitize o.containersFilteredModel\n\t\t\t\tif ( _isArray( o.containersFilteredModel ) ) {\n\t\t\t\t\t// |-------- is 2D array? -----------|\n\t\t\t\t\to.containersFilteredModel = _isArray( o.containersFilteredModel[ 0 ] ) ? o.containersFilteredModel : [ o.containersFilteredModel ];\n\t\t\t\t} else {\n\t\t\t\t\to.containersFilteredModel = [];\n\t\t\t\t}\n\n\t\t\t\t// feed containers groups and optionaly do same for models\n\t\t\t\tif ( !o.nameSpace ) {\n\t\t\t\t\to.nameSpace = [ 'dragularCommon' ];\n\t\t\t\t}\n\n\t\t\t\tif ( !_isArray( o.nameSpace ) ) {\n\t\t\t\t\to.nameSpace = [ o.nameSpace ];\n\t\t\t\t}\n\n\t\t\t\to.nameSpace.forEach( function eachNameSpace( nameSpace ) {\n\n\t\t\t\t\tif ( !shared.containers[ nameSpace ] ) {\n\n\t\t\t\t\t\tshared.containers[ nameSpace ] = [];\n\t\t\t\t\t\tshared.containersCtx[ nameSpace ] = [];\n\t\t\t\t\t}\n\n\t\t\t\t\tvar len = getContainers( o ).length,\n\t\t\t\t\t\tcont;\n\n\t\t\t\t\tfor ( var i = 0; i < len; i++ ) {\n\n\t\t\t\t\t\tcont = getContainers( o )[ i ];\n\n\t\t\t\t\t\tif (!cont) {\n\t\t\t\t\t\t\tthrow new Error( 'Container element must be defined!' );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (shared.containers[ nameSpace ].indexOf(cont) !== -1) {\n\t\t\t\t\t\t\tthrow new Error( 'Cannot register container element more than once! Container element: ' );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tshared.containers[ nameSpace ].push(cont);\n\t\t\t\t\t\tshared.containersCtx[ nameSpace ].push({\n\t\t\t\t\t\t\to: o,\n\t\t\t\t\t\t\tm: getContainersModel( o )[ i ], // can be undefined\n\t\t\t\t\t\t\tfm: o.containersFilteredModel[ i ] // can be undefined\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tfunction registerEvents( remove ) {\n\t\t\t\tvar op = remove ? 'off' : 'on';\n\t\t\t\tregEvent( _docElm, op, 'mouseup', release );\n\n\t\t\t\tgetContainers( o ).forEach( function addMouseDown( container ) {\n\t\t\t\t\tregEvent( container, 'on', 'mousedown', grab );\n\t\t\t\t} );\n\n\t\t\t\tif ( !remove ) { // create dragular DOM events\n\t\t\t\t\tangular.forEach( [ 'dragularenter', 'dragularleave', 'dragularrelease' ], function prepareDragOverEvents( name ) {\n\t\t\t\t\t\tvar eventName = o.eventNames[ name ];\n\t\t\t\t\t\tif ( !shared.dragOverEvents[ eventName ] ) {\n\t\t\t\t\t\t\tif ( _doc.createEvent ) {\n\t\t\t\t\t\t\t\tshared.dragOverEvents[ eventName ] = _doc.createEvent( 'HTMLEvents' );\n\t\t\t\t\t\t\t\tshared.dragOverEvents[ eventName ].initEvent( eventName, true, true );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tshared.dragOverEvents[ eventName ] = _doc.createEventObject();\n\t\t\t\t\t\t\t\tshared.dragOverEvents[ eventName ].eventType = eventName;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\t// ====================================================================================================================================\n\t\t\t// Grab stage: ------------------------------------------------------------------------------------------------------------------------\n\t\t\t// ====================================================================================================================================\n\n\n\t\t\tfunction grab( e ) {\n\n\t\t\t\t// filter some odd situations\n\t\t\t\tif ( whichMouseButton( e ) !== 1 || e.metaKey || e.ctrlKey ) {\n\t\t\t\t\treturn; // we only care about honest-to-god left clicks and touch events\n\t\t\t\t}\n\n\t\t\t\t// set itial values\n\t\t\t\tshared.moveX = e.clientX;\n\t\t\t\tshared.moveY = e.clientY;\n\n\t\t\t\tvar context = canStart( e.target );\n\t\t\t\tif ( !context || !context.item ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tshared.grabbed = context;\n\t\t\t\teventualMovements();\n\t\t\t\tif ( e.type === 'mousedown' ) {\n\t\t\t\t\tif ( isInput( e.target ) ) { // see also: https://github.com/bevacqua/dragula/issues/208\n\t\t\t\t\t\te.target.focus(); // fixes https://github.com/bevacqua/dragula/issues/176\n\t\t\t\t\t\t// changed from context.item to e.target fixing https://github.com/luckylooke/dragular/issues/87#issuecomment-256865796\n\t\t\t\t\t} else {\n\t\t\t\t\t\te.preventDefault(); // fixes https://github.com/bevacqua/dragula/issues/155\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction eventualMovements( remove ) {\n\n\t\t\t\tvar op = remove ? 'off' : 'on';\n\t\t\t\tregEvent( _docElm, op, 'mousemove', startBecauseMouseMoved );\n\t\t\t}\n\n\t\t\tfunction startBecauseMouseMoved( e ) {\n\n\t\t\t\tif ( !shared.grabbed || drake.dragging ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( e.originalEvent ) {\n\t\t\t\t\te = e.originalEvent; // jQuery enviroment\n\t\t\t\t}\n\n\t\t\t\tif ( whichMouseButton( e ) === 0 ) {\n\t\t\t\t\trelease( {} );\n\t\t\t\t\treturn; // when text is selected on an input and then dragged, mouseup doesn't fire. this is our only hope\n\t\t\t\t}\n\n\t\t\t\t// truthy check fixes dragula-#239, equality fixes dragula-#207\n\t\t\t\tif ( e.clientX && e.clientX === shared.moveX && e.clientY && e.clientY === shared.moveY ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( g( o.ignoreInputTextSelection ) ) {\n\n\t\t\t\t\tvar clientX = getCoord( 'clientX', e ),\n\t\t\t\t\t\tclientY = getCoord( 'clientY', e ),\n\t\t\t\t\t\telementBehindCursor = _doc.elementFromPoint( clientX, clientY );\n\t\t\t\t\tif ( isInput( elementBehindCursor ) ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tvar grabbed = shared.grabbed; // calling end() unsets shared.grabbed\n\t\t\t\teventualMovements( 'remove' ); // remove mousemove listener\n\t\t\t\tmovements();\n\t\t\t\tend();\n\t\t\t\tstart( grabbed );\n\n\t\t\t\tif ( !shared.item ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// automaticly detect direction of elements if not set in options\n\t\t\t\tif ( !o.direction && getParent( shared.sourceItem ) ) {\n\t\t\t\t\tvar parent = shared.sourceItem.parentNode,\n\t\t\t\t\t\tparentHeight = parent.offsetHeight,\n\t\t\t\t\t\tparentWidth = parent.offsetWidth,\n\t\t\t\t\t\tchildHeight = shared.sourceItem.clientHeight,\n\t\t\t\t\t\tchildWidth = shared.sourceItem.clientWidth;\n\t\t\t\t\to.direction = parentHeight / childHeight < parentWidth / childWidth ? 'horizontal' : 'vertical';\n\t\t\t\t}\n\n\t\t\t\t// get initial coordinates, used to render shared.mirror for first time\n\t\t\t\tvar offset = getOffset( shared.sourceItem );\n\t\t\t\tshared.offsetX = getCoord( 'pageX', e ) - offset.left;\n\t\t\t\tshared.offsetY = getCoord( 'pageY', e ) - offset.top;\n\t\t\t\tshared.clientX = getCoord( 'clientX', e );\n\t\t\t\tshared.clientY = getCoord( 'clientY', e );\n\n\t\t\t\t// limiting area of shared.mirror movement, get initial coordinates\n\t\t\t\tif ( o.boundingBox ) {\n\t\t\t\t\tshared.offsetXr = getCoord( 'pageX', e ) - offset.right;\n\t\t\t\t\tshared.offsetYb = getCoord( 'pageY', e ) - offset.bottom;\n\t\t\t\t}\n\n\t\t\t\te.preventDefault();\n\n\t\t\t\trenderMirrorImage();\n\t\t\t\taddClass( shared.item, o.classes.transit );\n\t\t\t\t// initial position\n\t\t\t\tshared.mirror.style.left = shared.clientX - shared.offsetX + 'px';\n\t\t\t\tshared.mirror.style.top = shared.clientY - shared.offsetY + 'px';\n\n\t\t\t\tdrag( e );\n\t\t\t}\n\n\t\t\tfunction movements( remove ) {\n\n\t\t\t\tvar op = remove ? 'off' : 'on';\n\t\t\t\tregEvent( _docElm, op, 'selectstart', preventGrabbed ); // IE8\n\t\t\t\tregEvent( _docElm, op, 'click', preventGrabbed );\n\t\t\t\tregEvent( _docElm, op, 'touchmove', preventGrabbed ); // fixes touch devices scrolling while drag\n\t\t\t}\n\n\t\t\tfunction canStart( item ) {\n\t\t\t\tif ( drake.dragging && shared.mirror ) {\n\t\t\t\t\treturn; // already dragging\n\t\t\t\t}\n\n\t\t\t\tvar handle = item;\n\t\t\t\twhile ( getParent( item ) && !isContainer( getParent( item ) ) ) {\n\t\t\t\t\t// break loop if user tries to drag item which is considered invalid handle\n\t\t\t\t\tif ( o.invalid( item, handle ) ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\titem = getParent( item ); // drag target should be immediate child of container\n\t\t\t\t\tif ( !item ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tvar source = getParent( item );\n\t\t\t\tif ( !source ||\n\t\t\t\t\to.invalid( item, handle ) || !o.moves( item, source, handle, nextEl( item ) ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\treturn {\n\t\t\t\t\titem: item,\n\t\t\t\t\tsource: source\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tfunction start( context ) {\n\t\t\t\tshared.sourceItem = shared.item = context.item;\n\t\t\t\tshared.source = context.source;\n\t\t\t\tshared.initialSibling = shared.currentSibling = nextEl( context.item );\n\n\t\t\t\tif ( g( o.copy, [ context.item, context.source ] ) ) {\n\t\t\t\t\t// http://api.jquery.com/clone/#clone-withDataAndEvents-deepWithDataAndEvents\n\t\t\t\t\tshared.item = angular.element( context.item ).clone( o.copy === 'events', o.copy === 'events' )[0];\n\t\t\t\t\tshared.copy = o.copy;\n\t\t\t\t\tif ( o.scope ) {\n\t\t\t\t\t\to.scope.$emit( o.eventNames.dragularcloned, shared.item, context.item );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tshared.copy = false;\n\t\t\t\t}\n\n\t\t\t\t// prepare models operations\n\t\t\t\tvar containerIndex = getContainers( o ).indexOf( context.source );\n\t\t\t\tshared.sourceModel = getContainersModel( o )[ containerIndex ];\n\n\t\t\t\tshared.sourceFilteredModel = o.containersFilteredModel[ containerIndex ];\n\t\t\t\tshared.initialIndex = domIndexOf( context.item, context.source );\n\n\t\t\t\tdrake.dragging = true;\n\t\t\t\tif ( o.scope ) {\n\t\t\t\t\to.scope.$emit( o.eventNames.dragulardrag, shared.sourceItem, shared.source );\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tfunction manualStart( item ) {\n\t\t\t\tvar context = canStart( item );\n\t\t\t\tif ( context ) {\n\t\t\t\t\tshared.grabbed = context;\n\t\t\t\t\teventualMovements();\n\t\t\t\t\t//start(context);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction renderMirrorImage() {\n\t\t\t\tif ( shared.mirror ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tvar rect = shared.sourceItem.getBoundingClientRect();\n\t\t\t\tshared.mirror = shared.sourceItem.cloneNode( true );\n\t\t\t\tshared.mirrorWidth = rect.width;\n\t\t\t\tshared.mirrorHeight = rect.height;\n\t\t\t\tshared.mirror.style.width = getRectWidth( rect ) + 'px';\n\t\t\t\tshared.mirror.style.height = getRectHeight( rect ) + 'px';\n\t\t\t\taddClass( shared.mirror, o.classes.mirror );\n\t\t\t\to.mirrorContainer.appendChild( shared.mirror );\n\t\t\t\tregEvent( _docElm, 'on', 'mousemove', drag );\n\t\t\t\taddClass( _doc.body, o.classes.unselectable );\n\t\t\t\tregEvent( shared.mirror, 'on', 'wheel', scrollContainer );\n\t\t\t\tif ( o.scope ) {\n\t\t\t\t\to.scope.$emit( o.eventNames.dragularcloned, shared.mirror, shared.sourceItem );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction end() {\n\t\t\t\tif ( !drake.dragging || !shared.item ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tdrop( shared.item, getParent( shared.item ) );\n\t\t\t}\n\n\t\t\tfunction ungrab() {\n\t\t\t\tshared.grabbed = false;\n\t\t\t\teventualMovements( 'remove' );\n\t\t\t\tmovements( 'remove' );\n\t\t\t}\n\n\n\t\t\t// ====================================================================================================================================\n\t\t\t// Drag stage: ------------------------------------------------------------------------------------------------------------------------\n\t\t\t// ====================================================================================================================================\n\n\n\t\t\tfunction drag( e ) { // watch performance!! - function is running each mousemove!\n\t\t\t\tif ( !shared.mirror ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif ( e.originalEvent ) {\n\t\t\t\t\te = e.originalEvent; // jQuery environment\n\t\t\t\t}\n\n\t\t\t\t// update coordinates\n\t\t\t\tshared.clientX = getCoord( 'clientX', e );\n\t\t\t\tshared.clientY = getCoord( 'clientY', e );\n\n\t\t\t\t// count mirror coordinates\n\t\t\t\tvar x = shared.clientX - shared.offsetX,\n\t\t\t\t\ty = shared.clientY - shared.offsetY,\n\t\t\t\t\tpageX,\n\t\t\t\t\tpageY,\n\t\t\t\t\toffsetBox;\n\n\t\t\t\t// fill extra properties if boundingBox is used\n\t\t\t\tif ( o.boundingBox ) {\n\t\t\t\t\tpageX = getCoord( 'pageX', e );\n\t\t\t\t\tpageY = getCoord( 'pageY', e );\n\t\t\t\t\toffsetBox = getOffset( o.boundingBox );\n\t\t\t\t}\n\n\t\t\t\tif ( !o.lockY ) {\n\t\t\t\t\tif ( !o.boundingBox || (pageX > offsetBox.left + shared.offsetX && pageX < offsetBox.right + shared.offsetXr) ) {\n\t\t\t\t\t\tshared.mirror.style.left = x + 'px';\n\t\t\t\t\t} else if ( o.boundingBox ) { // check again in case user scrolled the view\n\t\t\t\t\t\tif ( pageX < offsetBox.left + shared.offsetX ) {\n\t\t\t\t\t\t\tshared.mirror.style.left = shared.clientX - (pageX - offsetBox.left) + 'px';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tshared.mirror.style.left = shared.clientX - shared.mirrorWidth - (pageX - offsetBox.right) + 'px';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ( !o.lockX ) {\n\t\t\t\t\tif ( !o.boundingBox || (pageY > offsetBox.top + shared.offsetY && pageY < offsetBox.bottom + shared.offsetYb) ) {\n\t\t\t\t\t\tshared.mirror.style.top = y + 'px';\n\t\t\t\t\t} else if ( o.boundingBox ) { // check again in case user scrolled the view\n\t\t\t\t\t\tif ( pageY < offsetBox.top + shared.offsetY ) {\n\t\t\t\t\t\t\tshared.mirror.style.top = shared.clientY - (pageY - offsetBox.top) + 'px';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tshared.mirror.style.top = shared.clientY - shared.mirrorHeight - (pageY - offsetBox.bottom) + 'px';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tvar elementBehindCursor = getElementBehindPoint( shared.mirror, shared.clientX, shared.clientY ),\n\t\t\t\t\tdropTarget = findDropTarget( elementBehindCursor, shared.clientX, shared.clientY ),\n\t\t\t\t\tchanged = dropTarget !== shared.lastDropTarget;\n\n\t\t\t\tif ( elementBehindCursor !== shared.lastElementBehindCursor ) {\n\t\t\t\t\tfireEvent( elementBehindCursor, shared.dragOverEvents.dragularenter, !!dropTarget );\n\t\t\t\t\tif ( shared.lastElementBehindCursor ) {\n\t\t\t\t\t\tfireEvent( shared.lastElementBehindCursor, shared.dragOverEvents.dragularleave, elementBehindCursor );\n\t\t\t\t\t}\n\t\t\t\t\tshared.lastElementBehindCursor = elementBehindCursor;\n\t\t\t\t}\n\n\t\t\t\tif ( changed ) {\n\t\t\t\t\tif ( shared.lastDropTarget ) {\n\t\t\t\t\t\tmoved( 'out' );\n\t\t\t\t\t}\n\t\t\t\t\tshared.lastDropTarget = dropTarget;\n\t\t\t\t\tmoved( 'over' );\n\t\t\t\t}\n\n\t\t\t\t// do not copy in same container\n\t\t\t\tif ( dropTarget === shared.source && shared.copy && !g( o.copySortSource ) ) {\n\t\t\t\t\tif ( getParent( shared.item ) ) {\n\t\t\t\t\t\tshared.item.parentNode.removeChild( shared.item );\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar reference,\n\t\t\t\t\timmediate = getImmediateChild( dropTarget, elementBehindCursor );\n\n\t\t\t\tif ( immediate !== null ) {\n\t\t\t\t\treference = getReference( dropTarget, immediate, shared.clientX, shared.clientY );\n\t\t\t\t} else if ( g( o.revertOnSpill ) === true && !shared.copy ) {\n\t\t\t\t\t// the case that mirror is not over valid target and reverting is on and copy is off\n\t\t\t\t\treference = shared.initialSibling;\n\t\t\t\t\tdropTarget = shared.source;\n\t\t\t\t} else {\n\t\t\t\t\t// the case that mirror is not over valid target and removing is on or copy is on\n\t\t\t\t\tif ( shared.copy && getParent( shared.item ) ) {\n\t\t\t\t\t\t// remove item or copy of item\n\t\t\t\t\t\tshared.item.parentNode.removeChild( shared.item );\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( reference === null ||\n\t\t\t\t\treference !== shared.item &&\n\t\t\t\t\treference !== nextEl( shared.item ) &&\n\t\t\t\t\treference !== shared.currentSibling ) {\n\t\t\t\t\t// moving item/copy to new container from previous one\n\t\t\t\t\tshared.currentSibling = reference;\n\n\t\t\t\t\tdropTarget.insertBefore( shared.item, reference ); // if reference is null item is inserted at the end\n\n\t\t\t\t\tif ( o.scope ) {\n\t\t\t\t\t\to.scope.$emit( o.eventNames.dragularshadow, shared.item, dropTarget, e );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfunction moved( type ) {\n\t\t\t\t\tif ( o.scope ) {\n\t\t\t\t\t\tnotify( o.scope );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( shared.targetCtx && shared.targetCtx.o.scope && shared.targetCtx.o.scope !== o.scope ) {\n\t\t\t\t\t\tnotify( shared.targetCtx.o.scope );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( g( o.removeOnSpill ) === true ) {\n\t\t\t\t\t\ttype === 'over' ? spillOver() : spillOut();\n\t\t\t\t\t}\t\n\n\t\t\t\t\tfunction notify( scope ){\n\t\t\t\t\t\tscope.$emit( o.eventNames[ 'dragular' + type ], shared.item, shared.lastDropTarget, shared.source, e );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// find valid drop container\n\t\t\tfunction findDropTarget( elementBehindCursor, clientX, clientY ) { // watch performance!! - running each move!\n\t\t\t\tvar target = elementBehindCursor,\n\t\t\t\t\ttargetCtx = null;\n\n\t\t\t\twhile ( target && !accepted() ) {\n\t\t\t\t\ttarget = getParent( target );\n\t\t\t\t}\n\n\t\t\t\t// bugfix #148 model not updated on spill\n\t\t\t\t// added target condition to fix #161\n\t\t\t\tif ( target && targetCtx ){\n\t\t\t\t\tshared.targetCtx = targetCtx;\n\t\t\t\t}\n\n\t\t\t\treturn target;\n\n\t\t\t\tfunction accepted() {\n\n\t\t\t\t\tif ( !isContainer( target ) ) { // is not droppable?\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\tvar immediate = getImmediateChild( target, elementBehindCursor ),\n\t\t\t\t\t\treference = getReference( target, immediate, clientX, clientY ),\n\t\t\t\t\t\tinitial = isInitialPlacement( target, reference ),\n\t\t\t\t\t\ti = o.nameSpace.length,\n\t\t\t\t\t\tnameSpace;\n\n\t\t\t\t\twhile ( i-- ) { // for each namespace\n\t\t\t\t\t\tnameSpace = o.nameSpace[ i ];\n\t\t\t\t\t\tif ( shared.containers[ nameSpace ].indexOf( target ) !== -1 ) {\n\t\t\t\t\t\t\ttargetCtx = getTargetCtx( nameSpace );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// shared.target must be actual (used for scroll functionality)\n\t\t\t\t\tshared.target = target;\n\n\t\t\t\t\tif ( initial ) {\n\n\t\t\t\t\t\treturn true; // accepts = true;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// try to find target in default set of containers\n\t\t\t\t\t\tif ( !targetCtx ) {\n\t\t\t\t\t\t\ttargetCtx = getTargetCtx( 'dragularCommon' );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// if found and containersModel is dynamic, retrieve model\n\t\t\t\t\t\tif ( targetCtx && _isFunction( targetCtx.o.containersModel ) ) {\n\t\t\t\t\t\t\t// fix targetCtx.m(odel) for dynamic containersModel\n\t\t\t\t\t\t\ttargetCtx.m = getContainersModel( targetCtx.o )[ getContainers( targetCtx.o ).indexOf( target ) ];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( targetCtx && // target container is defined via service or directive\n\t\t\t\t\t\t\ttargetCtx.o.accepts && !targetCtx.o.accepts( shared.item, target, shared.source, reference, shared.sourceModel, shared.initialIndex ) ) {\n\n\t\t\t\t\t\t\treturn false;\n\n\t\t\t\t\t\t} else if ( o.isContainer && // target container is recognized via o.isContainer\n\t\t\t\t\t\t\to.isContainerAccepts && !o.isContainerAccepts( shared.item, target, shared.source, reference, shared.sourceModel, shared.initialIndex ) ) {\n\n\t\t\t\t\t\t\treturn false;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn !o.canBeAccepted || o.canBeAccepted( shared.item, target, shared.source, reference, shared.sourceModel, shared.initialIndex );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tfunction getTargetCtx( nameSpace ) {\n\t\t\t\t\treturn shared.containersCtx[ nameSpace ] && shared.containersCtx[ nameSpace ][ shared.containers[ nameSpace ].indexOf( target ) ];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction spillOver() {\n\t\t\t\trmClass( shared.item, o.classes.hide );\n\t\t\t}\n\n\t\t\tfunction spillOut() {\n\t\t\t\tif ( drake.dragging ) {\n\t\t\t\t\taddClass( shared.item, o.classes.hide );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// is item currently placed in original container and original position?\n\t\t\tfunction isInitialPlacement( target, s ) { // watch performance - running each move several times!\n\t\t\t\tvar sibling = s !== undefined ? s : (shared.mirror ? shared.currentSibling : nextEl( shared.item ));\n\t\t\t\treturn target === shared.source && sibling === shared.initialSibling;\n\t\t\t}\n\n\t\t\tfunction getImmediateChild( dropTarget, target ) { // watch performance - running each move several times!\n\t\t\t\tvar immediate = target;\n\t\t\t\twhile ( immediate !== dropTarget && getParent( immediate ) !== dropTarget ) {\n\t\t\t\t\timmediate = getParent( immediate );\n\t\t\t\t}\n\t\t\t\tif ( immediate === _docElm ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\treturn immediate;\n\t\t\t}\n\n\t\t\tfunction getReference( dropTarget, target, x, y ) { // watch performance - running each move several times!\n\t\t\t\tvar horizontal = o.direction === 'horizontal';\n\t\t\t\treturn target !== dropTarget ? inside() : outside();\n\n\t\t\t\tfunction outside() { // slower, but able to figure out any position\n\t\t\t\t\tvar len = dropTarget.children.length,\n\t\t\t\t\t\ti, el, rect;\n\t\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\t\tel = dropTarget.children[ i ];\n\t\t\t\t\t\trect = el.getBoundingClientRect();\n\t\t\t\t\t\tif ( horizontal && rect.left > x ) {\n\t\t\t\t\t\t\treturn el;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( !horizontal && rect.top > y ) {\n\t\t\t\t\t\t\treturn el;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\tfunction inside() { // faster, but only available if dropped inside a child element\n\t\t\t\t\tvar rect = target.getBoundingClientRect();\n\t\t\t\t\tif ( horizontal ) {\n\t\t\t\t\t\treturn resolve( x > rect.left + getRectWidth( rect ) / 2 );\n\t\t\t\t\t}\n\t\t\t\t\treturn resolve( y > rect.top + getRectHeight( rect ) / 2 );\n\t\t\t\t}\n\n\t\t\t\tfunction resolve( after ) {\n\t\t\t\t\treturn after ? nextEl( target ) : target;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction getElementBehindPoint( point, x, y ) { // watch performance!! - function is running each mousemove!\n\t\t\t\tvar p = point || {},\n\t\t\t\t\tstate = p.className,\n\t\t\t\t\tel;\n\t\t\t\tp.className += ' ' + o.classes.hide;\n\t\t\t\tel = _doc.elementFromPoint( x, y );\n\t\t\t\tp.className = state;\n\t\t\t\treturn el;\n\t\t\t}\n\n\t\t\tfunction isContainer( el ) {\n\n\t\t\t\tif ( !el ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tvar i = o.nameSpace.length;\n\t\t\t\twhile ( i-- ) {\n\n\t\t\t\t\tif ( shared.containers[ o.nameSpace[ i ] ].indexOf( el ) !== -1 ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( o.isContainer( el ) ) {\n\n\t\t\t\t\tshared.tempModel = o.isContainerModel( el );\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\n\t\t\t\t\tshared.tempModel = null;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tfunction getContainers( opt ) {\n\n\t\t\t\treturn _getContainers( 'containers', opt );\n\t\t\t}\n\n\t\t\tfunction getContainersModel( opt ) {\n\n\t\t\t\treturn _getContainers( 'containersModel', opt, true );\n\t\t\t}\n\n\t\t\tfunction _getContainers( containersType, opt, to2d ) {\n\n\t\t\t\treturn _isFunction( opt[ containersType ] ) ? sanitizeContainers(\n\t\t\t\t\topt[ containersType ](\n\t\t\t\t\t\t(opt === o ? drake : null),\n\t\t\t\t\t\tshared\n\t\t\t\t\t),\n\t\t\t\t\tto2d,\n\t\t\t\t\topt.scope\n\t\t\t\t) : opt[ containersType ];\n\t\t\t}\n\n\t\t\tfunction cancel( revert ) {\n\t\t\t\tif ( !drake.dragging ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tvar reverts = arguments.length > 0 ? revert : g( o.revertOnSpill ),\n\t\t\t\t\tparent = getParent( shared.item );\n\n\t\t\t\tvar initial = isInitialPlacement( parent );\n\t\t\t\tif ( !initial && !shared.copy && reverts ) {\n\t\t\t\t\tshared.source.insertBefore( shared.item, shared.initialSibling );\n\t\t\t\t}\n\t\t\t\tif ( shared.sourceModel && !shared.copy && !reverts ) {\n\t\t\t\t\tdrop( shared.item, parent );\n\t\t\t\t} else if ( o.scope ) {\n\t\t\t\t\tif ( initial || reverts ) {\n\t\t\t\t\t\to.scope.$emit( o.eventNames.dragularcancel, shared.item, shared.source, shared.sourceModel, shared.initialIndex );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( !shared.sourceModel || shared.copy || reverts || initial ) {\n\t\t\t\t\tcleanup();\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\t// ====================================================================================================================================\n\t\t\t// Release stage: ------------------------------------------------------------------------------------------------------------------------\n\t\t\t// ====================================================================================================================================\n\n\n\t\t\tfunction release( e ) {\n\n\t\t\t\tungrab();\n\t\t\t\tif ( !drake.dragging ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif ( e.originalEvent ) {\n\t\t\t\t\te = e.originalEvent; // jQuery enviroment\n\t\t\t\t}\n\n\t\t\t\tshared.clientX = getCoord( 'clientX', e );\n\t\t\t\tshared.clientY = getCoord( 'clientY', e );\n\n\t\t\t\tvar elementBehindCursor = getElementBehindPoint( shared.mirror, shared.clientX, shared.clientY ),\n\t\t\t\t\tdropTarget = findDropTarget( elementBehindCursor, shared.clientX, shared.clientY );\n\n\t\t\t\tif ( dropTarget && ((shared.copy && g( o.copySortSource )) || (!shared.copy || dropTarget !== shared.source)) ) {\n\t\t\t\t\t// found valid target and (is not copy case or target is not initial container)\n\t\t\t\t\tdrop( shared.item, dropTarget );\n\t\t\t\t} else if ( g( o.removeOnSpill ) ) {\n\t\t\t\t\tremove();\n\t\t\t\t} else {\n\t\t\t\t\tcancel();\n\t\t\t\t}\n\n\t\t\t\t// after release there is no container hovered\n\t\t\t\tshared.target = null;\n\n\t\t\t\tif ( shared.lastElementBehindCursor ) {\n\t\t\t\t\tfireEvent( shared.lastElementBehindCursor, shared.dragOverEvents.dragularrelease, elementBehindCursor );\n\t\t\t\t}\n\n\t\t\t\tif ( o.scope ) {\n\t\t\t\t\to.scope.$emit( o.eventNames.dragularrelease, shared.item, shared.source, e );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction drop( item, target ) {\n\t\t\t\tif ( !item ) { // https://github.com/luckylooke/dragular/issues/102\n\t\t\t\t\tcleanup();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tvar sourceItem = shared.sourceItem,\n\t\t\t\t\tcurrentSibling = shared.currentSibling,\n\t\t\t\t\tdropIndex = domIndexOf( item, target );\n\n\t\t\t\tif ( shared.copy && target === shared.source && getParent( item ) && g( o.copySortSource ) ) {\n\t\t\t\t\titem.parentNode.removeChild( shared.sourceItem );\n\t\t\t\t}\n\n\t\t\t\tif ( shared.sourceModel && !isInitialPlacement( target ) ) {\n\t\t\t\t\tif ( shared.targetCtx && shared.targetCtx.fm ) { // target has filtered model\n\t\t\t\t\t\t// convert index from index-in-filteredModel to index-in-model\n\t\t\t\t\t\tdropIndex = shared.targetCtx.m.indexOf( shared.targetCtx.fm[ dropIndex ] );\n\t\t\t\t\t}\n\t\t\t\t\tif ( shared.sourceFilteredModel ) { // source has filtered model\n\t\t\t\t\t\t// convert index from index-in-filteredModel to index-in-model\n\t\t\t\t\t\tshared.initialIndex = shared.sourceModel.indexOf( shared.sourceFilteredModel[ shared.initialIndex ] );\n\t\t\t\t\t}\n\t\t\t\t\t$rootScope.$applyAsync( function applyDrop() {\n\t\t\t\t\t\tif ( !shared.sourceModel ) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( target === shared.source ) {\n\t\t\t\t\t\t\tshared.sourceModel.splice( dropIndex, 0, shared.sourceModel.splice( shared.initialIndex, 1 )[ 0 ] );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tshared.dropElmModel = shared.copy && !o.dontCopyModel ? angular.copy( shared.sourceModel[ shared.initialIndex ] ) : shared.sourceModel[ shared.initialIndex ];\n\n\t\t\t\t\t\t\tif ( !shared.tempModel ) {\n\t\t\t\t\t\t\t\tshared.targetModel = ( shared.targetCtx && shared.targetCtx.m ) || shared.sourceModel;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tshared.targetModel = shared.tempModel;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\titem.parentNode.removeChild( item ); // element must be removed for ngRepeat to apply correctly\n\n\t\t\t\t\t\t\tif ( !shared.copy ) {\n\t\t\t\t\t\t\t\tshared.sourceModel.splice( shared.initialIndex, 1 );\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( shared.targetModel ) {\n\t\t\t\t\t\t\t\tshared.targetModel.splice( dropIndex, 0, shared.dropElmModel );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// removing element, as protection against duplicates, angular ng-repeat will create new item according to model\n\t\t\t\t\t\tif ( getParent( item ) ) {\n\t\t\t\t\t\t\titem.parentNode.removeChild( item );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tafterDrop();\n\t\t\t\t\t} );\n\t\t\t\t} else {\n\t\t\t\t\tafterDrop();\n\t\t\t\t}\n\n\t\t\t\tfunction afterDrop() {\n\n\t\t\t\t\t// in nested containers case, new containers doesnt have registered mousedown\n\t\t\t\t\tgetContainers( o ).forEach( function readdMouseDown( container ) {\n\t\t\t\t\t\tregEvent( container, 'off', 'mousedown', grab );\n\t\t\t\t\t\tregEvent( container, 'on', 'mousedown', grab );\n\t\t\t\t\t} );\n\n\t\t\t\t\tif ( o.compileItemOnDrop ) {\n\t\t\t\t\t\tvar scope = angular.element( target ).scope ? angular.element( target ).scope() : o.scope;\n\t\t\t\t\t\tif ( scope ) {\n\t\t\t\t\t\t\tscope.$applyAsync( function () {\n\t\t\t\t\t\t\t\tvar content = $compile( shared.copy ? sourceItem.cloneNode( true ) : sourceItem )( scope );\n\t\t\t\t\t\t\t\tif ( item.parentNode === target ) {\n\t\t\t\t\t\t\t\t\ttarget.removeChild( item );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\ttarget.insertBefore( content[ 0 ], currentSibling );\n\t\t\t\t\t\t\t\tcleanup();\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( o.scope ) {\n\t\t\t\t\t\tnotify( o.scope );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( shared.targetCtx && shared.targetCtx.o.scope && shared.targetCtx.o.scope !== o.scope ) {\n\t\t\t\t\t\tnotify( shared.targetCtx.o.scope );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( !o.compileItemOnDrop ) {\n\t\t\t\t\t\tcleanup();\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction notify( scope ){\n\t\t\t\t\t\tif ( isInitialPlacement( target ) ) {\n\t\t\t\t\t\t\tscope.$emit( o.eventNames.dragularcancel, item, shared.source, shared.sourceModel, shared.initialIndex );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tscope.$emit( o.eventNames.dragulardrop, item, target, shared.source, shared.sourceModel, shared.initialIndex, shared.targetModel, dropIndex );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction remove() {\n\t\t\t\tif ( !drake.dragging ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tvar parent = getParent( shared.item );\n\n\t\t\t\tif ( parent ) {\n\t\t\t\t\tparent.removeChild( shared.item );\n\t\t\t\t}\n\n\t\t\t\tif ( shared.sourceModel ) {\n\t\t\t\t\t$rootScope.$applyAsync( function removeModel() {\n\t\t\t\t\t\tshared.sourceModel.splice( shared.initialIndex, 1 );\n\t\t\t\t\t\tcleanup();\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tif ( o.scope ) {\n\t\t\t\t\to.scope.$emit( shared.copy ? o.eventNames.dragularcancel : o.eventNames.dragularremove, shared.item, parent, shared.sourceModel, shared.initialIndex );\n\t\t\t\t}\n\t\t\t\tif ( !shared.sourceModel ) {\n\t\t\t\t\tcleanup();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction cleanup() {\n\t\t\t\tungrab();\n\t\t\t\tremoveMirrorImage();\n\n\t\t\t\tif ( shared.item ) {\n\t\t\t\t\trmClass( shared.item, o.classes.transit );\n\t\t\t\t}\n\n\t\t\t\tdrake.dragging = false;\n\n\t\t\t\tif ( g( o.removeOnSpill ) === true ) {\n\t\t\t\t\tspillOut();\n\t\t\t\t}\n\n\t\t\t\tif ( o.scope ) {\n\t\t\t\t\tif ( shared.lastDropTarget ) {\n\t\t\t\t\t\to.scope.$emit( o.eventNames.dragularout, shared.item, shared.lastDropTarget, shared.source );\n\t\t\t\t\t}\n\t\t\t\t\to.scope.$emit( o.eventNames.dragulardragend, shared.item );\n\t\t\t\t}\n\n\t\t\t\tshared.source = shared.item = shared.sourceItem = shared.initialSibling = shared.currentSibling = shared.sourceModel = null;\n\t\t\t\tshared.initialIndex = shared.currentIndex = shared.lastDropTarget = shared.tempModel = shared.targetModel = null;\n\t\t\t\tshared.dropElmModel = shared.targetCtx = shared.copy = shared.moveX = shared.moveY = null;\n\t\t\t}\n\n\t\t\tfunction destroy() {\n\n\t\t\t\tregisterEvents( true );\n\t\t\t\tremoveContainers( o.containers );\n\t\t\t\trelease( {} );\n\t\t\t}\n\n\t\t\tfunction removeContainers( containers ) {\n\n\t\t\t\t$rootScope.$applyAsync( function applyDestroyed() {\n\n\t\t\t\t\tcontainers = _isArray( containers ) ? containers : makeArray( containers );\n\t\t\t\t\tcontainers.forEach( function forEachContainer( container ) {\n\n\t\t\t\t\t\tangular.forEach( o.nameSpace, function forEachNs( nameSpace ) {\n\n\t\t\t\t\t\t\tvar index;\n\t\t\t\t\t\t\tindex = shared.containers[ nameSpace ].indexOf( container );\n\t\t\t\t\t\t\tshared.containers[ nameSpace ].splice( index, 1 );\n\t\t\t\t\t\t\tshared.containersCtx[ nameSpace ].splice( index, 1 );\n\n\t\t\t\t\t\t\tif ( -1 < (index = initialContainers.indexOf( container )))\n\t\t\t\t\t\t\t\tinitialContainers.splice( index, 1 );\n\t\t\t\t\t\t} );\n\t\t\t\t\t} );\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tfunction addContainers( containers ) {\n\n\t\t\t\tcontainers = _isArray( containers ) ? containers : makeArray( containers );\n\t\t\t\tcontainers.forEach( function forEachContainer( container, i ) {\n\n\t\t\t\t\tangular.forEach( o.nameSpace, function forEachNs( nameSpace ) {\n\n\t\t\t\t\t\tshared.containers[ nameSpace ].push( container );\n\t\t\t\t\t\tshared.containersCtx[ nameSpace ].push({\n\t\t\t\t\t\t\to: o,\n\t\t\t\t\t\t\tm: getContainersModel( o )[ i ], // can be undefined\n\t\t\t\t\t\t\tfm: o.containersFilteredModel[ i ] // can be undefined\n\t\t\t\t\t\t});\n\t\t\t\t\t\tinitialContainers.push( container );\n\t\t\t\t\t} );\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tfunction scrollContainer( e ) {\n\t\t\t\tif ( shared.target ) {\n\t\t\t\t\tif ( e.originalEvent ) {\n\t\t\t\t\t\te = e.originalEvent; // jQuery enviroment\n\t\t\t\t\t}\n\t\t\t\t\tvar before = shared.target.scrollTop;\n\t\t\t\t\tshared.target.scrollTop += e.deltaY;\n\t\t\t\t\t// block scroll of the document when container can be scrolled\n\t\t\t\t\tif ( before !== shared.target.scrollTop ) {\n\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction removeMirrorImage() {\n\t\t\t\tif ( shared.mirror ) {\n\t\t\t\t\trmClass( _doc.body, o.classes.unselectable );\n\t\t\t\t\tregEvent( _docElm, 'off', 'mousemove', drag );\n\t\t\t\t\tregEvent( shared.mirror, 'off', 'wheel', scrollContainer );\n\t\t\t\t\tif ( getParent( shared.mirror ) ) {\n\t\t\t\t\t\tshared.mirror.parentNode.removeChild( shared.mirror );\n\t\t\t\t\t}\n\t\t\t\t\tshared.mirror = null;\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\t// ====================================================================================================================================\n\t\t\t// Other fns: -------------------------------------------------------------------------------------------------------------------------\n\t\t\t// ====================================================================================================================================\n\n\n\t\t\tfunction depSanitize( containersModel ) {\n\t\t\t\tconsole.warn( 'Deprecated method drake.sanitizeContainersModel! Will be removed in next major release! Please use sanitizeContainers instead.' );\n\t\t\t\tsanitizeContainers( containersModel, true, o.scope );\n\t\t\t}\n\n\t\t} // end of service\n\n\t\t/****************************************************************************************************************************/\n\t\t/****************************************************************************************************************************/\n\t\t/****************************************************************************************************************************/\n\n\t\t// HELPERS FUNCTIONS:\n\n\t\tfunction sanitizeContainers( containers, to2d, scope ) {\n\n\t\t\tif ( _isFunction( containers ) ) {\n\n\t\t\t\treturn containers;\n\t\t\t}\n\t\t\telse if ( _isArray( containers ) ) {\n\n\t\t\t\tif ( to2d ) {\n\t\t\t\t\t// |-------- is 2D array? -----------|\n\t\t\t\t\treturn _isArray( containers[ 0 ] ) ? containers : [ containers ];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn containers;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ( typeof containers === 'string' && scope ) {\n\n\t\t\t\tvar evaluated = scope.$eval( containers );\n\n\t\t\t\tif ( _isFunction( evaluated ) ) {\n\t\t\t\t\treturn evaluated;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn function () {\n\t\t\t\t\t\treturn scope.$eval( containers );\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ( containers ) {\n\n\t\t\t\treturn makeArray( containers );\n\t\t\t}\n\n\t\t\treturn [];\n\t\t}\n\n\t\tfunction regEvent( el, op, type, fn ) {\n\t\t\tvar touch = {\n\t\t\t\t\tmouseup: 'touchend',\n\t\t\t\t\tmousedown: 'touchstart',\n\t\t\t\t\tmousemove: 'touchmove'\n\t\t\t\t},\n\t\t\t\tpointers = {\n\t\t\t\t\tmouseup: 'pointerup',\n\t\t\t\t\tmousedown: 'pointerdown',\n\t\t\t\t\tmousemove: 'pointermove'\n\t\t\t\t},\n\t\t\t\tmicrosoft = {\n\t\t\t\t\tmouseup: 'MSPointerUp',\n\t\t\t\t\tmousedown: 'MSPointerDown',\n\t\t\t\t\tmousemove: 'MSPointerMove'\n\t\t\t\t},\n\t\t\t\t$el = angular.element( el );\n\n\t\t\tif ( el.addEventListener ) {\n\n\t\t\t\tvar opConvert = { on: 'addEventListener', off: 'removeEventListener' };\n\t\t\t\tel[ opConvert[ op ] ]( type, fn, { passive: false } );\n\t\t\t\tel[ opConvert[ op ] ]( touch[ type ], fn, { passive: false } );\n\n\t\t\t} else {\n\n\t\t\t\tif ( typeof navigator !== 'undefined' && navigator.pointerEnabled && pointers[ type ] ) {\n\t\t\t\t\t$el[ op ]( pointers[ type ], fn );\n\t\t\t\t} else if ( typeof navigator !== 'undefined' && navigator.msPointerEnabled && microsoft[ type ] ) {\n\t\t\t\t\t$el[ op ]( microsoft[ type ], fn );\n\t\t\t\t} else if ( touch[ type ] ) {\n\t\t\t\t\t$el[ op ]( touch[ type ], fn );\n\t\t\t\t}\n\t\t\t\t$el[ op ]( type, fn );\n\n\t\t\t}\n\t\t}\n\n\t\tfunction never() {\n\t\t\treturn false;\n\t\t}\n\n\t\tfunction always() {\n\t\t\treturn true;\n\t\t}\n\n\t\t// make array from array-like objects or from single element (based on bevacqua/atoa)\n\t\tfunction makeArray( all, startIndex ) {\n\t\t\tif ( _isArray( all ) ) {\n\t\t\t\treturn all;\n\t\t\t}\n\t\t\tif ( all.length ) { // is array-like\n\t\t\t\treturn Array.prototype.slice.call( all, startIndex ); // convert to vanilla js array\n\t\t\t} else { // is one element\n\t\t\t\treturn [ all ];\n\t\t\t}\n\t\t}\n\n\t\tfunction whichMouseButton( e ) {\n\t\t\tif ( e.touches ) {\n\t\t\t\treturn e.touches.length;\n\t\t\t}\n\t\t\tif ( e.originalEvent && e.originalEvent.touches ) {\n\t\t\t\treturn e.originalEvent.touches.length;\n\t\t\t}\n\t\t\tif ( e.which !== void 0 && e.which !== 0 ) {\n\t\t\t\treturn e.which;\n\t\t\t} // github.com/bevacqua/dragula/issues/261\n\t\t\tif ( e.buttons !== undefined ) {\n\t\t\t\treturn e.buttons;\n\t\t\t}\n\t\t\tvar button = e.button;\n\t\t\tif ( button !== undefined ) { // see github.com/jquery/jquery/blob/99e8ff1baa7ae341e94bb89c3e84570c7c3ad9ea/src/event.js#L573-L575\n\t\t\t\treturn button & 1 ? 1 : button & 2 ? 3 : (button & 4 ? 2 : 0);\n\t\t\t}\n\t\t}\n\n\t\tfunction preventGrabbed( e ) {\n\t\t\tif ( e.originalEvent ) {\n\t\t\t\te = e.originalEvent; // jQuery enviroment\n\t\t\t}\n\t\t\tif ( shared.grabbed ) {\n\t\t\t\te.preventDefault();\n\t\t\t}\n\t\t}\n\n\t\tfunction getScroll( scrollProp, offsetProp ) {\n\t\t\tif ( typeof window[ offsetProp ] !== 'undefined' ) {\n\t\t\t\treturn window[ offsetProp ];\n\t\t\t}\n\t\t\tif ( _docElm.clientHeight ) {\n\t\t\t\treturn _docElm[ scrollProp ];\n\t\t\t}\n\t\t\treturn _doc.body[ scrollProp ];\n\t\t}\n\n\t\tfunction getOffset( el ) { // watch performance!! - function is running each mousemove!\n\t\t\tvar rect = el.getBoundingClientRect(),\n\t\t\t\tscrollTop = getScroll( 'scrollTop', 'pageYOffset' ),\n\t\t\t\tscrollLeft = getScroll( 'scrollLeft', 'pageXOffset' );\n\t\t\treturn {\n\t\t\t\tleft: rect.left + scrollLeft,\n\t\t\t\tright: rect.right + scrollLeft,\n\t\t\t\ttop: rect.top + scrollTop,\n\t\t\t\tbottom: rect.bottom + scrollTop\n\t\t\t};\n\t\t}\n\n\t\tfunction getRectWidth( rect ) {\n\t\t\treturn rect.width || (rect.right - rect.left);\n\t\t}\n\n\t\tfunction getRectHeight( rect ) {\n\t\t\treturn rect.height || (rect.bottom - rect.top);\n\t\t}\n\n\t\tfunction getEmptyArray() {\n\t\t\treturn [];\n\t\t}\n\n\t\tfunction nextEl( el ) {\n\t\t\tif ( !el ) { // https://github.com/luckylooke/dragular/issues/102\n\t\t\t\treturn;\n\t\t\t}\n\t\t\treturn el.nextElementSibling || manually();\n\n\t\t\tfunction manually() {\n\t\t\t\tvar sibling = el;\n\t\t\t\tdo {\n\t\t\t\t\tsibling = sibling.nextSibling;\n\t\t\t\t} while ( sibling && sibling.nodeType !== 1 );\n\t\t\t\treturn sibling;\n\t\t\t}\n\t\t}\n\n\t\t//Cannot use angular.isElement because we need to check plain dom element, no jQlite wrapped\n\t\tfunction isElement( obj ) {\n\t\t\treturn (\n\t\t\t\ttypeof HTMLElement === 'object' ? obj instanceof HTMLElement : //DOM2\n\t\t\t\t\tobj && typeof obj === 'object' && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === 'string'\n\t\t\t);\n\t\t}\n\n\t\tfunction lookupClass( className ) {\n\t\t\tvar cached = shared.classesCache[ className ];\n\t\t\tif ( cached ) {\n\t\t\t\tcached.lastIndex = 0;\n\t\t\t} else {\n\t\t\t\tshared.classesCache[ className ] = cached = new RegExp( '(?:^|\\\\s)' + className + '(?:\\\\s|$)', 'g' );\n\t\t\t}\n\t\t\treturn cached;\n\t\t}\n\n\t\tfunction addClass( el, className ) {\n\t\t\tvar current = el.className;\n\t\t\tif ( !current.length ) {\n\t\t\t\tel.className = className;\n\t\t\t} else if ( !lookupClass( className ).test( current ) ) {\n\t\t\t\tel.className += ' ' + className;\n\t\t\t}\n\t\t}\n\n\t\tfunction rmClass( el, className ) {\n\t\t\tel.className = el.className.replace( lookupClass( className ), ' ' ).trim();\n\t\t}\n\n\t\tfunction getEventHost( e ) {\n\t\t\t// on touchend event, we have to use `e.changedTouches`\n\t\t\t// see http://stackoverflow.com/questions/7192563/touchend-event-properties\n\t\t\t// see https://github.com/bevacqua/dragula/issues/34\n\t\t\tif ( e.targetTouches && e.targetTouches.length ) {\n\t\t\t\treturn e.targetTouches[ 0 ];\n\t\t\t}\n\t\t\tif ( e.changedTouches && e.changedTouches.length ) {\n\t\t\t\treturn e.changedTouches[ 0 ];\n\t\t\t}\n\t\t\treturn e;\n\t\t}\n\n\t\tfunction getCoord( coord, e ) { // watch performance - running each move several times!\n\t\t\tvar host = getEventHost( e );\n\t\t\tvar missMap = {\n\t\t\t\tpageX: 'clientX', // IE8\n\t\t\t\tpageY: 'clientY' // IE8\n\t\t\t};\n\t\t\tif ( coord in missMap && !(coord in host) && missMap[ coord ] in host ) {\n\t\t\t\tcoord = missMap[ coord ];\n\t\t\t}\n\n\t\t\t// Adding support for touch events, as they are not functional in the original\n\t\t\tif ( !host.type || host.type.indexOf( 'touch' ) < 0 ) {\n\t\t\t\treturn host[ coord ];\n\t\t\t} else {\n\t\t\t\tif ( host.type.indexOf( 'end' ) === -1 ) {\n\t\t\t\t\t// No clientX or clientY in a touch event\n\t\t\t\t\treturn host.originalEvent.touches[ 0 ][ coord.replace( 'client', 'page' ) ];\n\t\t\t\t}\n\t\t\t\t// Nothing should happen for touchend\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfunction getParent( el ) { // watch performance!! - function is running each mousemove!\n\t\t\treturn el.parentNode === document ? null : el.parentNode;\n\t\t}\n\n\t\tfunction isInput( el ) {\n\t\t\treturn el.tagName === 'INPUT' || el.tagName === 'TEXTAREA' || el.tagName === 'SELECT' || isEditable( el );\n\t\t}\n\n\t\tfunction isEditable( el ) {\n\t\t\tif ( !el ) {\n\t\t\t\treturn false;\n\t\t\t} // no parents were editable\n\t\t\tif ( el.contentEditable === 'false' ) {\n\t\t\t\treturn false;\n\t\t\t} // stop the lookup\n\t\t\tif ( el.contentEditable === 'true' ) {\n\t\t\t\treturn true;\n\t\t\t} // found a contentEditable element in the chain\n\t\t\treturn isEditable( getParent( el ) ); // contentEditable is set to 'inherit'\n\t\t}\n\n\t\tfunction domIndexOf( child, parent ) {\n\t\t\treturn Array.prototype.indexOf.call( angular.element( parent ).children(), child );\n\t\t}\n\n\t\tfunction fireEvent( target, e, extra ) { // watch performance!! - function is running each mousemove!\n\t\t\tif ( !target ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tshared.extra = extra;\n\t\t\tif ( target.dispatchEvent ) {\n\t\t\t\ttarget.dispatchEvent( e );\n\t\t\t} else {\n\t\t\t\ttarget.fireEvent( 'on' + e.eventType, e );\n\t\t\t}\n\t\t}\n\n\t\tfunction getBool( prop, args, context ) {\n\t\t\tif ( _isFunction( prop ) ) {\n\t\t\t\treturn !!prop.apply( context || this, args || shared );\n\t\t\t} else {\n\t\t\t\treturn !!prop;\n\t\t\t}\n\t\t}\n\n\t};\n\n\tdragularService.$inject = [ '$rootScope', '$compile' ];\n\n\tmodule.exports = dragularService;\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar examplesRouter = function ($stateProvider, $urlRouterProvider) {\n\t $urlRouterProvider.otherwise('/home');\n\n\t var timer,\n\t ctrl = function routerCtrl($state, $stateParams, $timeout) {\n\t // go to install notes by default\n\t if (!$stateParams.link) {\n\t timer = $timeout(function timer() {\n\t $state.go('docs.detail', {\n\t link: 'docsInstall'\n\t });\n\t },0);\n\t }else{\n\t $timeout.cancel(timer);\n\t }\n\t };\n\n\t ctrl.$inject = ['$state', '$stateParams', '$timeout'];\n\n\t $stateProvider\n\t .state('home', {\n\t url: '/home',\n\t templateUrl: 'partials/partial-home.html'\n\t })\n\t .state('docs', {\n\t url: '/docs',\n\t templateUrl: 'partials/partial-docs.html',\n\t controller: ctrl\n\t })\n\t .state('docs.detail', {\n\t url: '/:link',\n\t templateUrl: function($stateParams) {\n\t return $stateParams.link + '/' + $stateParams.link + '.html';\n\t },\n\t controller: ctrl\n\t })\n\t .state('contribute', {\n\t url: '/contribute',\n\t templateUrl: 'partials/partial-contribute.html'\n\t });\n\t};\n\n\texamplesRouter.$inject = ['$stateProvider', '$urlRouterProvider'];\n\n\tmodule.exports = examplesRouter;\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar BasicCtrl = function ($element, dragularService) {\n\t dragularService.cleanEnviroment();\n\t dragularService('.containerVertical');\n\t};\n\n\tBasicCtrl.$inject = ['$element', 'dragularService'];\n\n\tmodule.exports = BasicCtrl;\n\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\tvar BasicModelCtrl = function ($scope, $element, dragularService) {\n\t $scope.items1 = [{\n\t content: 'Move me, but you can only drop me in one of these containers.'\n\t }, {\n\t content: 'If you try to drop me somewhere other than these containers, I\\'ll just come back.'\n\t }, {\n\t content: 'Item 3'\n\t }, {\n\t content: 'Item 4'\n\t }];\n\t $scope.items2 = [{\n\t content: 'Item 5'\n\t }, {\n\t content: 'Item 6'\n\t }, {\n\t content: 'Item 7'\n\t }, {\n\t content: 'Item 8'\n\t }];\n\t var containers = $element.children().eq(0).children();\n\t dragularService.cleanEnviroment();\n\t // var drake = dragularService([containers[0],containers[1]],{\n\t // dragularService([containers[0]],{\n\t dragularService([containers[0], containers[1]],{\n\t containersModel: [$scope.items1, $scope.items2],\n\t // canBeAccepted: function () {\n\t // return false;\n\t // },\n\t // accepts: function () {\n\t // return false;\n\t // },\n\t // isContainer: function (el) {\n\t // return el.id == 'test';\n\t // },\n\t // isContainerModel: function () {\n\t // return $scope.items2;\n\t // }\n\t // scope: $scope\n\t });\n\n\t\t// $scope.$on('dragularcloned', myFn('cloned'));\n\t\t// $scope.$on('dragulardrag', myFn('drag'));\n\t\t// $scope.$on('dragularcancel', myFn('cancel'));\n\t\t// $scope.$on('dragulardrop', myFn('drop'));\n\t\t// $scope.$on('dragularremove', myFn('remove'));\n\t\t// $scope.$on('dragulardragend', myFn('dragend'));\n\t\t// $scope.$on('dragularshadow', myFn('shadow'));\n\t\t//\n\t\t// function myFn(eventName) {\n\t\t// \treturn function() {\n\t\t// \t\tconsole.log(eventName, arguments, drake);\n\t\t// \t};\n\t\t// }\n\n\t};\n\n\tBasicModelCtrl.$inject = ['$scope', '$element', 'dragularService'];\n\n\tmodule.exports = BasicModelCtrl;\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar BoundingBoxCtrl = function ($element, dragularService) {\n\t var boundingBox = $element[0];\n\t dragularService.cleanEnviroment();\n\n\t dragularService($element.children(), {\n\t boundingBox: boundingBox\n\t });\n\t};\n\n\tBoundingBoxCtrl.$inject = ['$element', 'dragularService'];\n\n\tmodule.exports = BoundingBoxCtrl;\n\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar BoundingBoxLockXCtrl = function ($element, dragularService) {\n\t var boundingBox = $element.children().children()[0];\n\t dragularService.cleanEnviroment();\n\t dragularService(boundingBox, {\n\t boundingBox: boundingBox,\n\t lockX: true\n\t });\n\t};\n\n\tBoundingBoxLockXCtrl.$inject = ['$element', 'dragularService'];\n\n\tmodule.exports = BoundingBoxLockXCtrl;\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar BoundingBoxLockYCtrl = function ($element, dragularService) {\n\t var boundingBox = $element.children().children()[0];\n\t dragularService.cleanEnviroment();\n\t dragularService(boundingBox, {\n\t boundingBox: boundingBox,\n\t lockY: true\n\t });\n\t};\n\n\tBoundingBoxLockYCtrl.$inject = ['$element', 'dragularService'];\n\n\tmodule.exports = BoundingBoxLockYCtrl;\n\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar CopyCtrl = function ($element, dragularService) {\n\t dragularService.cleanEnviroment();\n\t dragularService($element.children(), {\n\t copy: true\n\t });\n\t};\n\n\tCopyCtrl.$inject = ['$element', 'dragularService'];\n\n\tmodule.exports = CopyCtrl;\n\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar CopyModelCtrl = function ($scope, $element, dragularService) {\n\t $scope.items1 = [{\n\t content: 'Move me, and make copy on drop.'\n\t }, {\n\t content: 'If you try to drop me somewhere other than these containers, I\\'ll just come back.'\n\t }, {\n\t content: 'Item 3'\n\t }, {\n\t content: 'Item 4'\n\t }];\n\t $scope.items2 = [{\n\t content: 'Item 5'\n\t }, {\n\t content: 'Item 6'\n\t }, {\n\t content: 'Item 7'\n\t }, {\n\t content: 'Item 8'\n\t }];\n\t var containers = $element.children().eq(0).children();\n\t dragularService.cleanEnviroment();\n\t dragularService([containers[0],containers[1]],{\n\t containersModel: [$scope.items1, $scope.items2],\n\t copy: true\n\t });\n\t};\n\n\tCopyModelCtrl.$inject = ['$scope', '$element', 'dragularService'];\n\n\tmodule.exports = CopyModelCtrl;\n\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar CustomClassesCtrl = function ($element, dragularService) {\n\t dragularService.cleanEnviroment();\n\t dragularService($element.children(), {\n\t classes: {\n\t mirror: 'custom-green-mirror'\n\t }\n\t });\n\t};\n\n\tCustomClassesCtrl.$inject = ['$element', 'dragularService'];\n\n\tmodule.exports = CustomClassesCtrl;\n\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar DifferentOptionsModelCtrl = function ($scope, $element, dragularService) {\n\t $scope.items1 = [{\n\t content: 'Move me, but you can only drop me in one of these containers.'\n\t }, {\n\t content: 'If you try to drop me somewhere other than these containers, I\\'ll just come back.'\n\t }, {\n\t content: 'Item 3'\n\t }, {\n\t content: 'Item 4'\n\t }];\n\t $scope.items2 = [{\n\t content: 'Item 5'\n\t }, {\n\t content: 'Item 6'\n\t }, {\n\t content: 'Item 7'\n\t }, {\n\t content: 'Item 8'\n\t }];\n\n\t var containerLeft = document.querySelector('#containerLeft'),\n\t containerRight = document.querySelector('#containerRight');\n\n\t function accepts(el, target, source) {\n\t // left->right || in same container\n\t if (source === containerLeft || source === target) {\n\t return true;\n\t }\n\t }\n\n\t dragularService.cleanEnviroment();\n\t dragularService([containerLeft], {\n\t containersModel: [$scope.items1],\n\t copy: true,\n\t copySortSource: true,\n\t //move only from left to right\n\t accepts: accepts\n\t });\n\n\t dragularService([containerRight], {\n\t containersModel: [$scope.items2],\n\t removeOnSpill: true,\n\t //move only from left to right\n\t accepts: accepts\n\t });\n\n\t};\n\n\tDifferentOptionsModelCtrl.$inject = ['$scope', '$element', 'dragularService'];\n\n\tmodule.exports = DifferentOptionsModelCtrl;\n\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar DirectiveCtrl = function ($scope) {\n\t $scope.dragularOptions = {\n\t classes: {\n\t mirror: 'custom-green-mirror'\n\t },\n\t nameSpace: 'same' // just connecting left and right container\n\t };\n\t};\n\n\tDirectiveCtrl.$inject = ['$scope'];\n\n\tmodule.exports = DirectiveCtrl;\n\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar DirectiveModelCtrl = function ($scope) {\n\t $scope.items1 = [{\n\t content: 'Move me, and make copy on drop.'\n\t }, {\n\t content: 'If you try to drop me somewhere other than these containers, I\\'ll just come back.'\n\t }, {\n\t content: 'Item 3'\n\t }, {\n\t content: 'Item 4'\n\t }];\n\t $scope.items2 = [{\n\t content: 'Item 5'\n\t }, {\n\t content: 'Item 6'\n\t }, {\n\t content: 'Item 7'\n\t }, {\n\t content: 'Item 8'\n\t }];\n\t $scope.dragularOptions = {\n\t containersModel: $scope.items1,\n\t classes: {\n\t mirror: 'custom-green-mirror'\n\t },\n\t nameSpace: 'common' // just connecting left and right container\n\t };\n\t};\n\n\tDirectiveModelCtrl.$inject = ['$scope'];\n\n\tmodule.exports = DirectiveModelCtrl;\n\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports) {\n\n\t/* global angular */\n\t'use strict';\n\n\tvar DragOverEventsCtrl = function ($element, dragularService) {\n\t dragularService.cleanEnviroment();\n\t dragularService([$element.children()[0], $element.children()[2]], {\n\t nameSpace: 'apples'\n\t });\n\t dragularService([$element.children()[1], $element.children()[3]], {\n\t nameSpace: 'oranges'\n\t });\n\n\t // containers events handling\n\t function registerEvents(el) {\n\t el.on('dragularenter', function(e) {\n\t if (el[0] === e.target) { // filter bubbled\n\t el.addClass(dragularService.shared.extra ? 'gu-over-accept' : 'gu-over-decline');\n\t }\n\t });\n\t el.on('dragularleave dragularrelease', function(e) {\n\t if ((el[0] === e.target && // filter bubbled\n\t dragularService.shared.extra && // extra on dragleave contains element the drag is leaving to\n\t dragularService.shared.extra.parentElement !== e.target) || // is that element child of this container?\n\t e.type === 'dragularrelease') {\n\t el.removeClass('gu-over-accept');\n\t el.removeClass('gu-over-decline');\n\t }\n\t });\n\t }\n\n\t angular.forEach($element.children(), function forEachChild(el) {\n\t registerEvents(angular.element(el));\n\t });\n\n\t // notContainer events handling\n\t var notContainer = angular.element(document.getElementsByClassName('notContainer'));\n\t notContainer.on('dragularenter', function() {\n\t notContainer.addClass('gu-over');\n\t });\n\t notContainer.on('dragularleave dragularrelease', function() {\n\t notContainer.removeClass('gu-over');\n\t });\n\t};\n\n\tDragOverEventsCtrl.$inject = ['$element', 'dragularService'];\n\n\tmodule.exports = DragOverEventsCtrl;\n\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar EventsCtrl = function ($scope, $element, dragularService, $timeout) {\n\t dragularService.cleanEnviroment();\n\t \n\t var drake = dragularService($element.children(), {\n\t scope: $scope\n\t });\n\t $scope.$on('dragulardrag', function(e, el) {\n\t e.stopPropagation();\n\t el.className = el.className.replace(' ex-moved', '');\n\t });\n\t $scope.$on('dragulardrop', function(e, el) {\n\t e.stopPropagation();\n\t $timeout(function() {\n\t el.className += ' ex-moved';\n\t }, 0);\n\t });\n\n\t $scope.$on('dragularcloned', myFn('cloned in EventsCtrl'));\n\t $scope.$on('dragulardrag', myFn('drag in EventsCtrl'));\n\t $scope.$on('dragularcancel', myFn('cancel in EventsCtrl'));\n\t $scope.$on('dragulardrop', myFn('drop in EventsCtrl'));\n\t $scope.$on('dragularremove', myFn('remove in EventsCtrl'));\n\t $scope.$on('dragulardragend', myFn('dragend in EventsCtrl'));\n\t $scope.$on('dragularshadow', myFn('shadow in EventsCtrl'));\n\n\t function myFn(eventName) {\n\t return function() {\n\t console.log(eventName, arguments, drake);\n\t };\n\t }\n\t};\n\n\tvar Events2Ctrl = function ($scope, $element, dragularService, $timeout) {\n\t var drake = dragularService($element.children(), {\n\t scope: $scope\n\t });\n\t $scope.$on('dragulardrag', function(e, el) {\n\t e.stopPropagation();\n\t el.className = el.className.replace(' ex-moved', '');\n\t });\n\t $scope.$on('dragulardrop', function(e, el) {\n\t e.stopPropagation();\n\t $timeout(function() {\n\t el.className += ' ex-moved';\n\t }, 0);\n\t });\n\n\t $scope.$on('dragularcloned', myFn('cloned in Events2Ctrl'));\n\t $scope.$on('dragulardrag', myFn('drag in Events2Ctrl'));\n\t $scope.$on('dragularcancel', myFn('cancel in Events2Ctrl'));\n\t $scope.$on('dragulardrop', myFn('drop in Events2Ctrl'));\n\t $scope.$on('dragularremove', myFn('remove in Events2Ctrl'));\n\t $scope.$on('dragulardragend', myFn('dragend in Events2Ctrl'));\n\t $scope.$on('dragularshadow', myFn('shadow in Events2Ctrl'));\n\n\t function myFn(eventName) {\n\t return function() {\n\t console.log(eventName, arguments, drake);\n\t };\n\t }\n\t};\n\n\tEventsCtrl.$inject = ['$scope', '$element', 'dragularService', '$timeout'];\n\tEvents2Ctrl.$inject = ['$scope', '$element', 'dragularService', '$timeout'];\n\n\tmodule.exports = [EventsCtrl, Events2Ctrl];\n\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar HandleCtrl = function ($element, dragularService) {\n\t dragularService.cleanEnviroment();\n\t\tdragularService($element.children(), {\n\t moves: function(el, container, handle) {\n\t return handle.classList.contains('handle');\n\t }\n\t });\n\t};\n\n\tHandleCtrl.$inject = ['$element', 'dragularService'];\n\n\tmodule.exports = HandleCtrl;\n\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar IsContainerModelCtrl = function ($scope, $element, dragularService) {\n\t $scope.items1 = [{\n\t content: 'Move me, but you can only drop me in one of these containers.'\n\t }, {\n\t content: 'If you try to drop me somewhere other than these containers, I\\'ll just come back.'\n\t }, {\n\t content: 'Item 3'\n\t }, {\n\t content: 'Item 4'\n\t }];\n\t $scope.cartModel = [];\n\n\t var containerLeft = document.querySelector('#containerLeft');\n\n\t dragularService.cleanEnviroment();\n\t dragularService([containerLeft], {\n\t containersModel: [$scope.items1],\n\t copy: true,\n\t isContainer: function isContainer (el) {\n\t return el.id === 'cart';\n\t },\n\t isContainerModel: function getModel (){\n\t return $scope.cartModel;\n\t }\n\t });\n\n\t $scope.removeItem = function removeItem() {\n\t var index = $scope.cartModel.indexOf(this.item);\n\t $scope.cartModel.splice(index, 1);\n\t };\n\t};\n\n\tIsContainerModelCtrl.$inject = ['$scope', '$element', 'dragularService'];\n\n\tmodule.exports = IsContainerModelCtrl;\n\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar NameSpacesCtrl = function ($element, dragularService) {\n\t dragularService.cleanEnviroment();\n\t dragularService([$element.children()[0], $element.children()[2]], {\n\t nameSpace: 'apples'\n\t });\n\t dragularService($element.children()[1], {\n\t nameSpace: 'oranges'\n\t });\n\t dragularService($element.children()[3], { // mixed\n\t nameSpace: ['oranges', 'apples']\n\t });\n\t};\n\n\tNameSpacesCtrl.$inject = ['$element', 'dragularService'];\n\n\tmodule.exports = NameSpacesCtrl;\n\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar NestedNgRepeatCtrl = function ($timeout, $scope, $element, dragularService) {\n\t $timeout(function() { // timeount due to ngRepeat to be ready\n\t dragularService.cleanEnviroment();\n\t dragularService($element, {\n\t nameSpace: 'rows',\n\t moves: function rowOnly (el, container, handle) {\n\t return handle.classList.contains('row-handle');\n\t }\n\t });\n\n\t dragularService($element.children(), {\n\t nameSpace: 'cells',\n\t moves: function excludeHandle (el, container, handle) {\n\t return !handle.classList.contains('row-handle');\n\t }\n\t });\n\t }, 0);\n\t $scope.items = [{\n\t items: [{\n\t content: 'Item a1'\n\t }, {\n\t content: 'Item a2'\n\t }, {\n\t content: 'Item a3'\n\t }, {\n\t content: 'Item a4'\n\t }]\n\t }, {\n\t items: [{\n\t content: 'Item b1'\n\t }, {\n\t content: 'Item b2'\n\t }, {\n\t content: 'Item b3'\n\t }, {\n\t content: 'Item b4'\n\t }]\n\t }, {\n\t items: [{\n\t content: 'Item c1'\n\t }, {\n\t content: 'Item c2'\n\t }, {\n\t content: 'Item c3'\n\t }, {\n\t content: 'Item c4'\n\t }]\n\t }];\n\t};\n\n\tNestedNgRepeatCtrl.$inject = ['$timeout', '$scope', '$element', 'dragularService'];\n\n\tmodule.exports = NestedNgRepeatCtrl;\n\n\n/***/ }),\n/* 22 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar NestedNgRepeatWithModelCtrl = function ($timeout, $scope, $element, dragularService) {\n\t $timeout(function() { // timeount due to nested ngRepeat to be ready\n\t var container = $element.children().eq(0).children(),\n\t parentContainers = container.children(),\n\t nestedContainers = [];\n\n\t dragularService.cleanEnviroment();\n\t dragularService(container, {\n\t moves: function(el, container, handle) {\n\t return handle.classList.contains('row-handle');\n\t },\n\t containersModel: $scope.items,\n\t nameSpace: 'rows'\n\t });\n\n\t // collect nested contianers\n\t for (var i = 0; i < parentContainers.length; i++) {\n\t nestedContainers.push(parentContainers.eq(i).children()[1]);\n\t }\n\n\t dragularService(nestedContainers, {\n\t moves: function(el, container, handle) {\n\t return !handle.classList.contains('row-handle');\n\t },\n\t containersModel: (function getNestedContainersModel(){\n\t var parent = $scope.items,\n\t containersModel = [];\n\t for (var i = 0; i < parent.length; i++) {\n\t containersModel.push(parent[i].items);\n\t }\n\t return containersModel;\n\t })(),\n\t nameSpace: 'cells'\n\t });\n\t }, 0);\n\t $scope.items = [{\n\t items: [{\n\t content: 'Item a1'\n\t }, {\n\t content: 'Item a2'\n\t }, {\n\t content: 'Item a3'\n\t }, {\n\t content: 'Item a4'\n\t }]\n\t }, {\n\t items: [{\n\t content: 'Item b1'\n\t }, {\n\t content: 'Item b2'\n\t }, {\n\t content: 'Item b3'\n\t }, {\n\t content: 'Item b4'\n\t }]\n\t }, {\n\t items: [{\n\t content: 'Item c1'\n\t }, {\n\t content: 'Item c2'\n\t }, {\n\t content: 'Item c3'\n\t }, {\n\t content: 'Item c4'\n\t }]\n\t }];\n\t};\n\n\tNestedNgRepeatWithModelCtrl.$inject = ['$timeout', '$scope', '$element', 'dragularService'];\n\n\tmodule.exports = NestedNgRepeatWithModelCtrl;\n\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar NgRepeatCtrl = function ($scope, $element, dragularService) {\n\t dragularService.cleanEnviroment();\n\t dragularService($element.children());\n\t $scope.items = [{\n\t content: 'Try to add or remove some elements (click on +- buttons), you will see that it is not problem for dragular.'\n\t }, {\n\t content: 'Item 2'\n\t }, {\n\t content: 'Item 3'\n\t }, {\n\t content: 'Item 4'\n\t }];\n\t $scope.addItem = function addItem() {\n\t var index = $scope.items.indexOf(this.item) + 1;\n\t $scope.items.splice(index, 0, {\n\t content: this.item.content + '-copy'\n\t });\n\t };\n\t $scope.removeItem = function removeItem() {\n\t var index = $scope.items.indexOf(this.item);\n\t $scope.items.splice(index, 1);\n\t };\n\t};\n\n\tNgRepeatCtrl.$inject = ['$scope', '$element', 'dragularService'];\n\n\tmodule.exports = NgRepeatCtrl;\n\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar NgRepeatFilteredWithModelCtrl = function ($scope, $element, dragularService, $filter) {\n\t $scope.items1 = [{\n\t content: 'Move me, but you can only drop me in one of these containers.'\n\t }, {\n\t content: 'If you try to drop me somewhere other than these containers, I\\'ll just come back.'\n\t }, {\n\t content: 'Apple 3'\n\t }, {\n\t content: 'Orange 4'\n\t }, {\n\t content: 'Orange 5'\n\t }, {\n\t content: 'Apple 6'\n\t }, {\n\t content: 'Apple 7'\n\t }, {\n\t content: 'Apple 8'\n\t }];\n\t $scope.items2 = [{\n\t content: 'Apple 9'\n\t }, {\n\t content: 'Orange 10'\n\t }, {\n\t content: 'Orange 11'\n\t }, {\n\t content: 'Apple 12'\n\t }, {\n\t content: 'Orange 13'\n\t }, {\n\t content: 'Apple 14'\n\t }];\n\t $scope.filter1query = 'Orange';\n\t $scope.filter2query = 'Orange';\n\t $scope.filteredModel1 = [];\n\t $scope.filteredModel2 = [];\n\t $scope.getFilteredModel = function (filteredModel, items, filterQuery) {\n\t filteredModel.length = 0;\n\t /*\n\t * Following one-liner is same like:\n\t * var filteredModelTemp = $filter('filter')(items, filterQuery);\n\t * angular.forEach(filteredModelTemp, function(item){\n\t * filteredModel.push(item);\n\t * });\n\t * Or like:\n\t * var filteredModelTemp = $filter('filter')(items, filterQuery);\n\t * for(var i; i < filteredModelTemp.length; i++){\n\t * filteredModel.push(filteredModelTemp[i]);\n\t * }\n\t *\n\t * You cannot just assign filtered array to filteredModel like this:\n\t * filteredModel = $filter('filter')(items, filterQuery);\n\t * Because you would replace the array object you provide to dragular with new one.\n\t * So dragular will continue to use the one it was provided on init.\n\t * Hopefully I make it clear. :)\n\t */\n\t [].push.apply(filteredModel, $filter('filter')(items, filterQuery));\n\n\t // Example with orderBy filter:\n\t // var tmp = [];\n\t // [].push.apply(tmp, $filter('filter')(items, filterQuery));\n\t // [].push.apply(filteredModel, $filter('orderBy')(tmp, '+content'));\n\n\t return filteredModel;\n\t };\n\t var containers = $element.children().eq(1).children();\n\t dragularService.cleanEnviroment();\n\t dragularService([containers[0],containers[1]],{\n\t containersModel: [$scope.items1, $scope.items2],\n\t containersFilteredModel: [$scope.filteredModel1, $scope.filteredModel2]\n\t });\n\t};\n\n\tNgRepeatFilteredWithModelCtrl.$inject = ['$scope', '$element', 'dragularService', '$filter'];\n\n\tmodule.exports = NgRepeatFilteredWithModelCtrl;\n\n\n/***/ }),\n/* 25 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar NgRepeatWithModelCtrl = function ($scope, $element, dragularService) {\n\t $scope.items = [{\n\t content: 'Try to add or remove some elements (click on +- buttons), you will see that it is not problem for dragular.'\n\t }, {\n\t content: 'Item 2'\n\t }, {\n\t content: 'Item 3'\n\t }, {\n\t content: 'Item 4'\n\t }];\n\t dragularService.cleanEnviroment();\n\t dragularService($element.children().eq(0).children(), {containersModel: $scope.items});\n\t $scope.addItem = function addItem() {\n\t var index = $scope.items.indexOf(this.item) + 1;\n\t $scope.items.splice(index, 0, {\n\t content: this.item.content + '-copy'\n\t });\n\t };\n\t $scope.removeItem = function removeItem() {\n\t var index = $scope.items.indexOf(this.item);\n\t $scope.items.splice(index, 1);\n\t };\n\t};\n\n\tNgRepeatWithModelCtrl.$inject = ['$scope', '$element', 'dragularService'];\n\n\tmodule.exports = NgRepeatWithModelCtrl;\n\n\n/***/ }),\n/* 26 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar RemoveOnSpillCtrl = function ($element, dragularService) {\n\t dragularService.cleanEnviroment();\n\t\tdragularService($element.children(), {\n\t removeOnSpill: true\n\t });\n\t};\n\n\tRemoveOnSpillCtrl.$inject = ['$element', 'dragularService'];\n\n\tmodule.exports = RemoveOnSpillCtrl;\n\n\n/***/ }),\n/* 27 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar RemoveOnSpillWithModelCtrl = function ($scope, $element, dragularService) {\n\t $scope.items1 = [{\n\t content: 'Move me, but you can only drop me in containers.'\n\t }, {\n\t content: 'If you try to drop me somewhere other than containers, I\\'ll die a fiery death.'\n\t }, {\n\t content: 'Item 3'\n\t }, {\n\t content: 'Item 4'\n\t }];\n\t $scope.items2 = [{\n\t content: 'You can drop me in the left container.'\n\t }, {\n\t content: 'Item 6'\n\t }, {\n\t content: 'Item 7'\n\t }, {\n\t content: 'Item 8'\n\t }];\n\t var containers = $element.children().eq(0).children();\n\t dragularService.cleanEnviroment();\n\t dragularService([containers[0], containers[1]], {\n\t containersModel: [$scope.items1, $scope.items2],\n\t removeOnSpill: true\n\t });\n\t};\n\n\tRemoveOnSpillWithModelCtrl.$inject = ['$scope', '$element', 'dragularService'];\n\n\tmodule.exports = RemoveOnSpillWithModelCtrl;\n\n\n/***/ }),\n/* 28 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar RevertOnSpillCtrl = function ($element, dragularService) {\n\t dragularService.cleanEnviroment();\n\t dragularService($element.children(), {\n\t revertOnSpill: true\n\t });\n\t};\n\n\tRevertOnSpillCtrl.$inject = ['$element', 'dragularService'];\n\n\tmodule.exports = RevertOnSpillCtrl;\n\n\n/***/ }),\n/* 29 */\n/***/ (function(module, exports) {\n\n\t/* global angular */\n\t'use strict';\n\n\tvar ScrollingDragCtrl = function ($interval, $element, dragularService) {\n\t var timer,\n\t leftScrollContainer = document.getElementById('leftScroll'),\n\t rightScrollContainer = document.getElementById('rightScroll'),\n\t leftTopBar = document.getElementById('leftTopBar'),\n\t leftBottomBar = document.getElementById('leftBottomBar'),\n\t rightTopBar = document.getElementById('rightTopBar'),\n\t rightBottomBar = document.getElementById('rightBottomBar');\n\n\t dragularService.cleanEnviroment();\n\t dragularService([leftScrollContainer, rightScrollContainer]);\n\n\t registerEvents(leftTopBar, leftScrollContainer, -5);\n\t registerEvents(leftBottomBar, leftScrollContainer, 5);\n\t registerEvents(rightTopBar, rightScrollContainer, -5);\n\t registerEvents(rightBottomBar, rightScrollContainer, 5);\n\n\t function registerEvents(bar, container, inc, speed) {\n\t if (!speed) {\n\t speed = 20;\n\t }\n\t angular.element(bar).on('dragularenter', function() {\n\t container.scrollTop += inc;\n\t timer = $interval(function moveScroll() {\n\t container.scrollTop += inc;\n\t }, speed);\n\t });\n\t angular.element(bar).on('dragularleave dragularrelease', function() {\n\t $interval.cancel(timer);\n\t });\n\t }\n\t};\n\n\tScrollingDragCtrl.$inject = ['$interval', '$element', 'dragularService'];\n\n\tmodule.exports = ScrollingDragCtrl;\n\n\n/***/ }),\n/* 30 */\n/***/ (function(module, exports) {\n\n\t/* global angular */\n\t'use strict';\n\n\tNestedRepeatsWithCustomDirective.$inject = ['dragularService', '$element', '$scope', '$timeout'];\n\n\tangular.module('examplesApp')\n\t\t.directive('questionDirective', QuestionsDirective)\n\t\t.controller('QuestionsController', QuestionsController);\n\n\tmodule.exports = NestedRepeatsWithCustomDirective;\n\n\n\n\tfunction NestedRepeatsWithCustomDirective( dragularService, $element, $scope, $timeout) {\n\n\t\tdragularService.cleanEnviroment();\n\n\t\t$scope.items = [\n\t\t\t{\n\t\t\t\tquestions:[\n\t\t\t\t\t{\n\t\t\t\t\t\ttext: 'text1',\n\t\t\t\t\t\tpoints: 1\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ttext: 'text2',\n\t\t\t\t\t\tpoints: 2\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ttext: 'text3',\n\t\t\t\t\t\tpoints: 3\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\torder: 1,\n\t\t\t\tname: 'x',\n\t\t\t\tage: '1'\n\t\t\t},\n\t\t\t{\n\t\t\t\tquestions:[\n\t\t\t\t\t{\n\t\t\t\t\t\ttext: 'text1',\n\t\t\t\t\t\tpoints: 1\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ttext: 'text2',\n\t\t\t\t\t\tpoints: 2\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ttext: 'text3',\n\t\t\t\t\t\tpoints: 3\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\torder: 2,\n\t\t\t\tname: 'y',\n\t\t\t\tage: '2'\n\t\t\t}, {\n\t\t\t\tquestions:[\n\t\t\t\t\t{\n\t\t\t\t\t\ttext: 'text1',\n\t\t\t\t\t\tpoints: 1\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ttext: 'text2',\n\t\t\t\t\t\tpoints: 2\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ttext: 'text3',\n\t\t\t\t\t\tpoints: 3\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\torder: 3,\n\t\t\t\tname: 'z',\n\t\t\t\tage: '3'\n\t\t\t},\n\t\t\t{\n\t\t\t\tquestions:[\n\t\t\t\t\t{\n\t\t\t\t\t\ttext: 'text1',\n\t\t\t\t\t\tpoints: 1\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ttext: 'text2',\n\t\t\t\t\t\tpoints: 2\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ttext: 'text3',\n\t\t\t\t\t\tpoints: 3\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\torder: 1,\n\t\t\t\tname: 'x',\n\t\t\t\tage: '4'\n\t\t\t}, {\n\t\t\t\tquestions:[\n\t\t\t\t\t{\n\t\t\t\t\t\ttext: 'text1',\n\t\t\t\t\t\tpoints: 1\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ttext: 'text2',\n\t\t\t\t\t\tpoints: 2\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ttext: 'text3',\n\t\t\t\t\t\tpoints: 3\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\torder: 2,\n\t\t\t\tname: 'y',\n\t\t\t\tage: '5'\n\t\t\t}, {\n\t\t\t\tquestions:[\n\t\t\t\t\t{\n\t\t\t\t\t\ttext: 'text1',\n\t\t\t\t\t\tpoints: 1\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ttext: 'text2',\n\t\t\t\t\t\tpoints: 2\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ttext: 'text3',\n\t\t\t\t\t\tpoints: 3\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\torder: 3,\n\t\t\t\tname: 'z',\n\t\t\t\tage: '6'\n\t\t\t}];\n\n\t\t// timeout due to document not ready, jsfiddle settings issue?\n\t\t$timeout(function() {\n\n\t\t\tdragularService('#items', {\n\t\t\t\tcontainersModel: 'items',\n\t\t\t\tscope: $scope,\n\t\t\t\tmoves: function itemsOnly (el, container, handle) {\n\t\t\t\t\treturn handle.classList.contains('item');\n\t\t\t\t},\n\t\t\t\tnameSpace:'items'\n\t\t\t});\n\n\t\t\t$scope.$on('dragulardrop', function(){\n\t\t\t\t$scope.items.forEach(function(item, index){\n\t\t\t\t\titem.order = index + 1;\n\t\t\t\t});\n\t\t\t});\n\n\t\t});\n\n\t}\n\n\tfunction QuestionsDirective() {\n\t\treturn {\n\t\t\trestrict : 'E',\n\t\t\ttemplate : 'download dragular.js and dragular.css from dist folder
\\nOR clone git
\\n\\ngit clone http://github.com/luckylooke/dragular.git\\n
\\nOR use npm
\\n\\n[sudo] npm install dragular\\n
\\nOR use bower
\\n\\nbower install dragular\\n
\\nAND include files into your project
\\n\\n<link href=\\'styles/dragular.css\\' rel=\\'stylesheet\\' type=\\'text/css\\' />\\n<script src=\\'scripts/dragular.js\\'></script>\\n
\\nAND put dragularModule into dependency array
\\n\\nvar app = angular.module(\\'myApp\\', [\\'dragularModule\\', \\'otherDependencies\\']);\\n
\\nDONE :)
\\n\");\n\t$templateCache.put(\"exampleBasic/exampleBasic.html\",\"\\n\\n\\n// JS\\n controller(\\'Basic\\', [\\'$element\\', \\'dragularService\\', function TodoCtrl($element, dragularService) {\\n dragularService(\\'.containerVertical\\');\\n }])\\n
\\n\\n// CSS\\n.clickedClass {\\n background-color: orange !important;\\n}\\n
\\n\\n<!-- HTML -->\\n <div class=\\'wrapper\\' ng-controller="Basic">\\n <div class=\\'containerVertical\\'>\\n <div>Move me, but you can only drop me in one of these containers.</div>\\n <div>If you try to drop me somewhere other than these containers, I\\'ll just come back.</div>\\n <div>Item 3.</div>\\n <div>Item 6.</div>\\n </div>\\n <div class=\\'containerVertical\\'>\\n <div>You can drop me in the left container, otherwise I\\'ll stay here.</div>\\n <div ng-click=\\\"clicked = !clicked\\\" ng-class=\\\"clicked && \\'clickedClass\\'\\\">Try to click me, dragular distinguish drag from click</div>\\n <div>Item 5.</div>\\n </div>\\n</div>\\n
\\n
Items1:\\n\\n
{{items1 | json}}
Items2:\\n\\n
{{items2 | json}}
\\n\\n\\n// JS\\n controller(\\'BasicModel\\', [\\'$scope\\', \\'$element\\', \\'dragularService\\', function TodoCtrl($scope, $element, dragularService) {\\n $scope.items1 = [{\\n content: \\'Move me, but you can only drop me in one of these containers.\\'\\n }, {\\n content: \\'If you try to drop me somewhere other than these containers, I\\\\\\'ll just come back.\\'\\n }, {\\n content: \\'Item 3\\'\\n }, {\\n content: \\'Item 4\\'\\n }];\\n $scope.items2 = [{\\n content: \\'Item 5\\'\\n }, {\\n content: \\'Item 6\\'\\n }, {\\n content: \\'Item 7\\'\\n }, {\\n content: \\'Item 8\\'\\n }];\\n var containers = $element.children().children();\\n dragularService([containers[0],containers[1]],{\\n containersModel: [$scope.items1, $scope.items2]\\n });\\n }])\\n
\\n\\n<!-- HTML -->\\n<div class=\\'wrapper\\' ng-controller="Basic">\\n <div class=\\'tableRow\\'>\\n <div class=\\'containerVertical\\'>\\n <div ng-repeat="item in items1">{{item.content}}</div>\\n </div>\\n <div class=\\'containerVertical\\'>\\n <div ng-repeat="item in items2">{{item.content}}</div>\\n </div>\\n </div>\\n <div class="tableRow">\\n <div class="container">\\n <div>Items1:\\n <br/>{{items1 | json}}</div>\\n </div>\\n <div class="container">\\n <div>Items2:\\n <br/>{{items2 | json}}</div>\\n </div>\\n </div>\\n</div>\\n
\\n
\\n \\n dragularService([$element.children(), {\\n boundingBox: $element\\n });\\n
\\n
\\n \\n \\n dragularService([$element.children()[0].children(), {\\n boundingBox: $element.children()[0],\\n lockX: true\\n });\\n
\\n
\\n \\n \\n dragularService([$element.children()[0].children(), {\\n boundingBox: $element.children()[0],\\n lockY: true\\n });\\n
\\n
\\n \\n\\n\\n// JS\\n controller(\\'Copy\\', [\\'$element\\', \\'dragularService\\', function TodoCtrl($element, dragularService) {\\n dragularService($element.children(), {\\n copy: true\\n });\\n }])\\n
\\n\\n<!-- HTML -->\\n<div class=\\'wrapper\\' ng-controller="Copy" ng-hide="globals.showModelExamples">\\n <div id=\\'left2\\' class=\\'containerVertical\\'>\\n <div>Move me, and make copy on drop.</div>\\n <div>If you try to drop me somewhere other than these containers, I\\'ll just come back.</div>\\n </div>\\n <div id=\\'right2\\' class=\\'containerVertical\\'>\\n <div>You can drop me in the left container, otherwise I\\'ll stay here.</div>\\n </div>\\n </div>\\n
\\n
\\n {{ items1 | json }}\\n\\n
\\n {{ items2 | json }}\\n\\n
\\n\\n\\n// JS\\n controller(\\'CopyModel\\', [\\'$scope\\', \\'$element\\', \\'dragularService\\', function TodoCtrl($scope, $element, dragularService) {\\n $scope.items1 = [{\\n content: \\'Move me, and make copy on drop.\\'\\n }, {\\n content: \\'If you try to drop me somewhere other than these containers, I\\\\\\'ll just come back.\\'\\n }, {\\n content: \\'Item 3\\'\\n }, {\\n content: \\'Item 4\\'\\n }];\\n $scope.items2 = [{\\n content: \\'Item 5\\'\\n }, {\\n content: \\'Item 6\\'\\n }, {\\n content: \\'Item 7\\'\\n }, {\\n content: \\'Item 8\\'\\n }];\\n var containers = $element.children().children();\\n dragularService([containers[0],containers[1]],{\\n containersModel: [$scope.items1, $scope.items2],\\n copy: true\\n });\\n }])\\n
\\n\\n<!-- HTML -->\\n<div class=\\'wrapper\\' ng-controller="CopyModel" ng-show="globals.showModelExamples">\\n <div class=\\'tableRow\\'>\\n <div class=\\'containerVertical\\'>\\n <div ng-repeat="item in items1">{{item.content}}</div>\\n </div>\\n <div class=\\'containerVertical\\'>\\n <div ng-repeat="item in items2">{{item.content}}</div>\\n </div>\\n </div>\\n <div class="tableRow">\\n <div class="container">\\n <div>Items1:\\n <br/>{{items1 | json}}</div>\\n </div>\\n <div class="container">\\n <div>Items2:\\n <br/>{{items2 | json}}</div>\\n </div>\\n </div>\\n </div>\\n
\\n
\\n \\n dragularService([document.getElementById(left), document.getElementById(right)], { classes: {\\n mirror: \\'custom-green-mirror\\'\\n } });\\n\\n // Default classes are:\\n option.classes = {\\n mirror: \\'gu-mirror\\',\\n hide: \\'gu-hide\\',\\n unselectable: \\'gu-unselectable\\',\\n transit: \\'gu-transit\\',\\n overActive: \\'gu-over-active\\',\\n overAccepts: \\'gu-over-accept\\',\\n overDeclines: \\'gu-over-decline\\'\\n };\\n
\\n
\\nItems1:\\n\\n
{{items1 | json}}
Items2:\\n\\n
{{items2 | json}}
\\n\\n\\n// JS\\n .controller(\\'DifferentOptionsModel\\', [\\'$scope\\', \\'$element\\', \\'dragularService\\', function TodoCtrl($scope, $element, dragularService) {\\n $scope.items1 = [{\\n content: \\'Move me, but you can only drop me in one of these containers.\\'\\n }, {\\n content: \\'If you try to drop me somewhere other than these containers, I\\\\\\'ll just come back.\\'\\n }, {\\n content: \\'Item 3\\'\\n }, {\\n content: \\'Item 4\\'\\n }];\\n $scope.items2 = [{\\n content: \\'Item 5\\'\\n }, {\\n content: \\'Item 6\\'\\n }, {\\n content: \\'Item 7\\'\\n }, {\\n content: \\'Item 8\\'\\n }];\\n\\n var containerLeft = document.querySelector(\\'#containerLeft\\'),\\n containerRight = document.querySelector(\\'#containerRight\\');\\n\\n function accepts(el, target, source) {\\n if (source === containerLeft || source === target) {\\n return true;\\n }\\n }\\n\\n dragularService([containerLeft], {\\n containersModel: [$scope.items1],\\n copy: true,\\n //move only from left to right \\n accepts: accepts\\n });\\n\\n dragularService([containerRight], {\\n containersModel: [$scope.items2],\\n removeOnSpill: true,\\n //move only from left to right \\n accepts: accepts\\n });\\n\\n }])\\n
\\n\\n<!-- HTML -->\\n<div class=\\'wrapper\\' ng-controller="DifferentOptionsModel">\\n <div class=\\'tableRow\\'>\\n <div id="containerLeft" class=\\'containerVertical\\'>\\n <div ng-repeat="item in items1">{{item.content}}</div>\\n </div>\\n <div id="containerRight" class=\\'containerVertical\\'>\\n <div ng-repeat="item in items2">{{item.content}}</div>\\n </div>\\n </div>\\n <div class="tableRow">\\n <div class=\\'containerVertical\\'>\\n <pre>Items1:\\n <br/>{{items1 | json}}</pre>\\n </div>\\n <div class=\\'containerVertical\\'>\\n <pre>Items2:\\n <br/>{{items2 | json}}</pre>\\n </div>\\n </div>\\n </div>\\n
\\n
\\n\\n\\n// JS\\n controller(\\'Directive\\', [\\'$scope\\', \\'dragularService\\', function TodoCtrl($scope) {\\n $scope.dragularOptions = {\\n classes: {\\n mirror: \\'custom-green-mirror\\'\\n },\\n nameSpace: \\'common\\' // just connecting left and right container\\n };\\n }])\\n
\\n\\n<!-- HTML -->\\n<div class=\\'wrapper\\' ng-controller="Directive">\\n <div class=\\'containerVertical\\' dragular="dragularOptions">\\n <div>Move me, but you can only drop me in one of these containers.</div>\\n <div>If you try to drop me somewhere other than these containers, I\\'ll just come back.</div>\\n <div>Item 3.</div>\\n <div>Item 6.</div>\\n </div>\\n <div class=\\'containerVertical\\' dragular=\\'{"classes":{"mirror":"custom-green-mirror"},"nameSpace":"same"}\\'>\\n <div>You can drop me in the left container, otherwise I\\'ll stay here.</div>\\n <div>Item 4.</div>\\n <div>Item 5.</div>\\n </div>\\n </div>\\n
\\n
\\n \\n\\n\\n// JS\\n controller(\\'DirectiveModel\\', [\\'$scope\\', function TodoCtrl($scope) {\\n $scope.items1 = [{\\n content: \\'Move me, and make copy on drop.\\'\\n }, {\\n content: \\'If you try to drop me somewhere other than these containers, I\\\\\\'ll just come back.\\'\\n }, {\\n content: \\'Item 3\\'\\n }, {\\n content: \\'Item 4\\'\\n }];\\n $scope.items2 = [{\\n content: \\'Item 5\\'\\n }, {\\n content: \\'Item 6\\'\\n }, {\\n content: \\'Item 7\\'\\n }, {\\n content: \\'Item 8\\'\\n }];\\n $scope.dragularOptions = {\\n containersModel: $scope.items1,\\n classes: {\\n mirror: \\'custom-green-mirror\\'\\n },\\n nameSpace: \\'common\\' // just connecting left and right container\\n };\\n }])\\n
\\n\\n<!-- HTML -->\\n <div class=\\'wrapper\\' ng-controller="DirectiveModel">\\n <div class=\\'containerVertical\\' dragular="dragularOptions">\\n <div ng-repeat="item in items1">{{item.content}}</div>\\n </div>\\n <div class=\\'containerVertical\\' dragular=\\'{"containersModel":"items2","classes":{"mirror":"custom-green-mirror"},"nameSpace":"common"}\\'>\\n <div ng-repeat="item in items2">{{item.content}}</div>\\n </div>\\n</div>\\n
\\n
You can interact with dragging element by litening to dragOver events. Usually you want to containers show wheather they accepts element or not, but you can use it anywhere. DragOver events are: dragenter, dragleave and dragrelease. On dragOver events dragularService reveals several useful properties.
\\n\\ndragularService.shared.item | \\nitem beeing dragged (it is copy of item if copy is enabled via options) | \\n
dragularService.shared.source | \\nsource container item is dragged from | \\n
dragularService.shared.sourceModel | \\nsource container model representation if model was porvided | \\n
dragularService.shared.initialIndex | \\noriginal index of item, can be used to get item model from sourceModel | \\n
dragularService.shared.extra | \\ncontains accepting information (boolean) on dragenter, element drag is leaving to on dragleave and element behind the cursor on dragrelease | \\n
Try to drag over the not-container too.
\\n\\n \\n<!-- HTML -->\\n <div class=\\'wrapper\\' ng-controller="DragOverEvents">\\n <div class=\\'container width25\\'>\\n <div>apples and oranges cannot be mixed</div>\\n <div>apple 2</div>\\n ...\\n </div>\\n <div class=\\'container width25\\'>\\n <div>orange 1</div>\\n <div>orange 2</div>\\n ...\\n </div>\\n <div class=\\'container width25\\'>\\n <div>apple 5</div>\\n <div>apple 6</div>\\n ...\\n </div>\\n <div class=\\'container width25\\'>\\n <div>orange 5</div>\\n <div>orange 6</div>\\n ...\\n </div>\\n </div>\\n <div class="notContainer"> Test active class on NOT container.</div>\\n
\\n
\\n\\n \\n \\n // CSS\\n \\n.notContainer.gu-over {\\n background-color: yellow;\\n}\\n\\n.containerVertical.gu-over-accept {\\n background-color: green;\\n}\\n\\n.containerVertical.gu-over-decline {\\n background-color: red;\\n}\\n
\\n
\\n\\n \\n \\n // JS\\n controller(\\'DragOverEvents\\', [\\'$element\\', \\'dragularService\\', function TodoCtrl($element, dragularService) {\\n dragularService.cleanEnviroment();\\n dragularService([$element.children()[0], $element.children()[2]], {\\n nameSpace: \\'apples\\'\\n });\\n dragularService([$element.children()[1], $element.children()[3]], {\\n nameSpace: \\'oranges\\'\\n });\\n\\n // containers events handling\\n function registerEvents(el) {\\n el.on(\\'dragularenter\\', function(e) {\\n if (el[0] === e.target) { // filter bubbled\\n el.addClass(dragularService.shared.extra ? \\'gu-over-accept\\' : \\'gu-over-decline\\');\\n }\\n });\\n el.on(\\'dragularleave dragularrelease\\', function(e) {\\n if ((el[0] === e.target && // filter bubbled\\n dragularService.shared.extra && // extra on dragleave contains element the drag is leaving to\\n dragularService.shared.extra.parentElement !== e.target) // is that element child of this container?\\n || e.type === \\'dragularrelease\\') {\\n el.removeClass(\\'gu-over-accept\\');\\n el.removeClass(\\'gu-over-decline\\');\\n }\\n });\\n }\\n\\n angular.forEach($element.children(), function forEachChild(el) {\\n registerEvents(angular.element(el));\\n });\\n\\n // notContainer events handling\\n var notContainer = angular.element(document.getElementsByClassName(\\'notContainer\\'));\\n notContainer.on(\\'dragularenter\\', function() {\\n notContainer.addClass(\\'gu-over\\');\\n });\\n notContainer.on(\\'dragularleave dragularrelease\\', function() {\\n notContainer.removeClass(\\'gu-over\\');\\n });\\n }])\\n
\\n
\\nEvents affecting more than on cotrollers are emitted on both scopes if provided.
\\n\\n \\nvar EventsCtrl = function ($scope, $element, dragularService, $timeout) {\\n \\n var drake = dragularService($element.children(), {\\n scope: $scope\\n });\\n $scope.$on(\\'dragulardrag\\', function(e, el) {\\n e.stopPropagation();\\n el.className = el.className.replace(\\' ex-moved\\', \\'\\');\\n });\\n $scope.$on(\\'dragulardrop\\', function(e, el) {\\n e.stopPropagation();\\n $timeout(function() {\\n el.className += \\' ex-moved\\';\\n }, 0);\\n });\\n\\n $scope.$on(\\'dragularcloned\\', myFn(\\'cloned in EventsCtrl\\'));\\n $scope.$on(\\'dragulardrag\\', myFn(\\'drag in EventsCtrl\\'));\\n $scope.$on(\\'dragularcancel\\', myFn(\\'cancel in EventsCtrl\\'));\\n $scope.$on(\\'dragulardrop\\', myFn(\\'drop in EventsCtrl\\'));\\n $scope.$on(\\'dragularremove\\', myFn(\\'remove in EventsCtrl\\'));\\n $scope.$on(\\'dragulardragend\\', myFn(\\'dragend in EventsCtrl\\'));\\n $scope.$on(\\'dragularshadow\\', myFn(\\'shadow in EventsCtrl\\'));\\n\\n function myFn(eventName) {\\n return function() {\\n console.log(eventName, arguments, drake);\\n };\\n }\\n};\\n\\nvar Events2Ctrl = function ($scope, $element, dragularService, $timeout) {\\n var drake = dragularService($element.children(), {\\n scope: $scope\\n });\\n $scope.$on(\\'dragulardrag\\', function(e, el) {\\n e.stopPropagation();\\n el.className = el.className.replace(\\' ex-moved\\', \\'\\');\\n });\\n $scope.$on(\\'dragulardrop\\', function(e, el) {\\n e.stopPropagation();\\n $timeout(function() {\\n el.className += \\' ex-moved\\';\\n }, 0);\\n });\\n\\n $scope.$on(\\'dragularcloned\\', myFn(\\'cloned in Events2Ctrl\\'));\\n $scope.$on(\\'dragulardrag\\', myFn(\\'drag in Events2Ctrl\\'));\\n $scope.$on(\\'dragularcancel\\', myFn(\\'cancel in Events2Ctrl\\'));\\n $scope.$on(\\'dragulardrop\\', myFn(\\'drop in Events2Ctrl\\'));\\n $scope.$on(\\'dragularremove\\', myFn(\\'remove in Events2Ctrl\\'));\\n $scope.$on(\\'dragulardragend\\', myFn(\\'dragend in Events2Ctrl\\'));\\n $scope.$on(\\'dragularshadow\\', myFn(\\'shadow in Events2Ctrl\\'));\\n\\n function myFn(eventName) {\\n return function() {\\n console.log(eventName, arguments, drake);\\n };\\n }\\n};\\n
\\n
\\n\\n \\n dragularService([document.getElementById(left), document.getElementById(right)], {\\n moves: function (el, container, handle) {\\n return handle.className === \\'handle\\';\\n }\\n });\\n
\\n
\\nItems1:\\n\\n
{{items1 | json}}
Cart:\\n\\n
{{cartModel | json}}
\\n\\n\\n// JS\\n .controller(\\'IsContainerModel\\', [\\'$scope\\', \\'$element\\', \\'dragularService\\', function TodoCtrl($scope, $element, dragularService) {\\n $scope.items1 = [{\\n content: \\'Move me, but you can only drop me in one of these containers.\\'\\n }, {\\n content: \\'If you try to drop me somewhere other than these containers, I\\\\\\'ll just come back.\\'\\n }, {\\n content: \\'Item 3\\'\\n }, {\\n content: \\'Item 4\\'\\n }];\\n $scope.cartModel = [];\\n\\n var containerLeft = document.querySelector(\\'#containerLeft\\');\\n\\n dragularService.cleanEnviroment();\\n dragularService([containerLeft], {\\n containersModel: [$scope.items1],\\n copy: true,\\n isContainer: function isContainer (el) {\\n return el.id === \\'cart\\';\\n },\\n isContainerModel: function getModel (){\\n return $scope.cartModel;\\n }\\n });\\n\\n $scope.removeItem = function removeItem() {\\n var index = $scope.cartModel.indexOf(this.item);\\n $scope.cartModel.splice(index, 1);\\n };\\n\\n }])\\n
\\n\\n<!-- HTML -->\\n <div class=\\'wrapper\\' ng-controller="IsContainerModel">\\n <div class=\\'tableRow\\'>\\n <div id="containerLeft" class=\\'containerVertical\\'>\\n <div ng-repeat="item in items1">{{item.content}}</div>\\n </div>\\n <div id="cart" class=\\'containerVertical\\'>\\n <div class=\\'cursorDefault\\' ng-repeat="item in cartModel">{{item.content}}\\n <button class=\\'cursorDefault\\' ng-click="removeItem()">x</button></div>\\n </div>\\n </div>\\n <div class="tableRow">\\n <div class=\\'containerVertical\\'>\\n <pre>Items1:\\n <br/>{{items1 | json}}</pre>\\n </div>\\n <div class=\\'containerVertical\\'>\\n <pre>Cart:\\n <br/>{{cartModel | json}}</pre>\\n </div>\\n </div>\\n </div>\\n
\\n
\\n \\ndragularService([$element.children()[0], $element.children()[2]], {\\n nameSpace: \\'apples\\'\\n});\\ndragularService($element.children()[1], {\\n nameSpace: \\'oranges\\'\\n});\\ndragularService($element.children()[3], { // mixed\\n nameSpace: [\\'oranges\\', \\'apples\\']\\n});\\n
\\n
\\n \\n \\n // HTML\\n\\n <div ng-controller="Example15">\\n <div ng-repeat="item in items" class=\\'exampleRow\\'>\\n <div class="row-handle">Row {{$index}}</div>\\n <div ng-repeat="item in item.items" class="exampleCell">{{item.content}}</div>\\n </div>\\n </div>\\n
\\n
\\n \\n \\n // CSS\\n\\n .exampleRow {\\n display: flex;\\n flex-direction: row;\\n }\\n\\n .exampleCell {\\n flex-grow: 1;\\n }\\n\\n .exampleRow,\\n .exampleCell {\\n margin: 10px;\\n padding: 10px;\\n background-color: rgba(0, 0, 0, 0.2);\\n cursor: move;\\n cursor: grab;\\n cursor: -moz-grab;\\n cursor: -webkit-grab;\\n }\\n
\\n
\\n \\n \\n // JS\\n\\n .controller(\\'NestedNgRepeat\\', [\\'$timeout\\', \\'$scope\\', \\'$element\\', \\'dragularService\\', function NestedNgRepeatCtrl($timeout, $scope, $element, dragularService) {\\n $timeout(function() { // timeount due to ngRepeat to be ready\\n dragularService($element, {\\n nameSpace: \\'rows\\',\\n moves: function rowOnly (el, container, handle) {\\n return handle.classList.contains(\\'row-handle\\');\\n }\\n });\\n dragularService($element.children(), {\\n nameSpace: \\'cells\\',\\n moves: function excludeHandle (el, container, handle) {\\n return !handle.classList.contains(\\'row-handle\\');\\n }\\n });\\n }, 0);\\n $scope.items = [{\\n items: [{\\n content: \\'Item a1\\'\\n }, {\\n content: \\'Item a2\\'\\n }, {\\n content: \\'Item a3\\'\\n }, {\\n content: \\'Item a4\\'\\n }]\\n }, {\\n items: [{\\n content: \\'Item b1\\'\\n }, {\\n content: \\'Item b2\\'\\n }, {\\n content: \\'Item b3\\'\\n }, {\\n content: \\'Item b4\\'\\n }]\\n }, {\\n items: [{\\n content: \\'Item c1\\'\\n }, {\\n content: \\'Item c2\\'\\n }, {\\n content: \\'Item c3\\'\\n }, {\\n content: \\'Item c4\\'\\n }]\\n }];\\n }])\\n
\\n
\\n\\n\\nItems:\\n\\n
{{items | json}}
\\n \\n<!-- HTML -->\\n<div ng-controller="NestedNgRepeatWithModel">\\n <div class=\\'containerVertical\\'>\\n <div ng-repeat="item in items" class=\\'exampleRow\\'>\\n <div class="row-handle">Row {{::$index}}</div>\\n <div class="exampleRow exampleCell containerNested">\\n <div ng-repeat="item in item.items" class="exampleCell">{{item.content}}</div>\\n </div>\\n </div>\\n </div>\\n</div>\\n
\\n
\\n \\n \\n // CSS\\n\\n .exampleRow {\\n display: flex;\\n flex-direction: row;\\n }\\n\\n .exampleCell {\\n flex-grow: 1;\\n }\\n\\n .exampleRow,\\n .exampleCell {\\n margin: 10px;\\n padding: 10px;\\n background-color: rgba(0, 0, 0, 0.2);\\n cursor: move;\\n cursor: grab;\\n cursor: -moz-grab;\\n cursor: -webkit-grab;\\n }\\n
\\n
\\n \\n \\n // JS\\n.controller(\\'NestedNgRepeatWithModel\\', [\\'$timeout\\', \\'$scope\\', \\'$element\\', \\'dragularService\\', function NestedNgRepeatWithModelCtrl($timeout, $scope, $element, dragularService) {\\n $timeout(function() { // timeount due to nested ngRepeat to be ready\\n var container = $element.children().eq(0).children(),\\n parentContainers = container.children(),\\n nestedContainers = [];\\n\\n dragularService(container, {\\n moves: function(el, container, handle) {\\n return handle.classList.contains(\\'row-handle\\');\\n },\\n containersModel: $scope.items,\\n nameSpace: \\'rows\\'\\n });\\n\\n // collect nested contianers\\n for (var i = 0; i < parentContainers.length; i++) {\\n nestedContainers.push(parentContainers.eq(i).children()[1]);\\n }\\n\\n dragularService(nestedContainers, {\\n moves: function(el, container, handle) {\\n return !handle.classList.contains(\\'row-handle\\');\\n },\\n containersModel: (function getNestedContainersModel(){\\n var parent = $scope.items,\\n containersModel = [];\\n for (var i = 0; i < parent.length; i++) {\\n containersModel.push(parent[i].items);\\n }\\n return containersModel;\\n })(),\\n nameSpace: \\'cells\\'\\n });\\n }, 0);\\n $scope.items = [{\\n items: [{\\n content: \\'Item a1\\'\\n }, {\\n content: \\'Item a2\\'\\n }, {\\n content: \\'Item a3\\'\\n }, {\\n content: \\'Item a4\\'\\n }]\\n }, {\\n items: [{\\n content: \\'Item b1\\'\\n }, {\\n content: \\'Item b2\\'\\n }, {\\n content: \\'Item b3\\'\\n }, {\\n content: \\'Item b4\\'\\n }]\\n }, {\\n items: [{\\n content: \\'Item c1\\'\\n }, {\\n content: \\'Item c2\\'\\n }, {\\n content: \\'Item c3\\'\\n }, {\\n content: \\'Item c4\\'\\n }]\\n }];\\n }])\\n
\\n
\\n\\n \\n // HTML:\\n <div class=\\'containerVertical\\'>\\n <div ng-repeat="item in items">\\n {{item.content}}\\n </div>\\n </div>\\n\\n // JS:\\n dragularService($element.children());\\n $scope.items = [{\\n content: \\'Try to add or remove some elements (click on +- buttons), you will see that it is not problem for dragular.\\'\\n },{\\n content: \\'Item 2\\'\\n },{\\n content: \\'Item 3\\'\\n },{\\n content: \\'Item 4\\'\\n }];\\n
\\n
\\n Move stuff between these two filtered containers. You can play with filter inputs to see that everything goes right.\\n
\\n Please notify the getFilteredModel function, it is necessery for not replacing the initial array object with new filtered one!
Items1:\\n\\n
{{items1 | json}}
Items2:\\n\\n
{{items2 | json}}
\\n\\n\\n// JS\\n .controller(\\'NgRepeatFilteredWithModel\\', [\\'$scope\\', \\'$element\\', \\'dragularService\\', \\'$filter\\', function TodoCtrl($scope, $element, dragularService, $filter) {\\n $scope.items1 = [{\\n content: \\'Move me, but you can only drop me in one of these containers.\\'\\n }, {\\n content: \\'If you try to drop me somewhere other than these containers, I\\\\\\'ll just come back.\\'\\n }, {\\n content: \\'Apple 3\\'\\n }, {\\n content: \\'Orange 4\\'\\n }, {\\n content: \\'Orange 5\\'\\n }, {\\n content: \\'Apple 6\\'\\n }, {\\n content: \\'Apple 7\\'\\n }, {\\n content: \\'Apple 8\\'\\n }];\\n $scope.items2 = [{\\n content: \\'Apple 9\\'\\n }, {\\n content: \\'Orange 10\\'\\n }, {\\n content: \\'Orange 11\\'\\n }, {\\n content: \\'Apple 12\\'\\n }, {\\n content: \\'Orange 13\\'\\n }, {\\n content: \\'Apple 14\\'\\n }];\\n $scope.filter1query = \\'Orange\\';\\n $scope.filter2query = \\'Orange\\';\\n $scope.filteredModel1 = [];\\n $scope.filteredModel2 = [];\\n $scope.getFilteredModel = function (filteredModel, items, filterQuery) {\\n filteredModel.length = 0;\\n /*\\n * Following one-liner is same like:\\n * var filteredModelTemp = $filter(\\'filter\\')(items, filterQuery);\\n * angular.forEach(filteredModelTemp, function(item){\\n * filteredModel.push(item);\\n * });\\n * Or like:\\n * var filteredModelTemp = $filter(\\'filter\\')(items, filterQuery);\\n * for(var i; i < filteredModelTemp.length; i++){\\n * filteredModel.push(filteredModelTemp[i]);\\n * }\\n *\\n * You cannot just assign filtered array to filteredModel like this:\\n * filteredModel = $filter(\\'filter\\')(items, filterQuery);\\n * Because you would replace the array object you provide to dragular with new one.\\n * So dragular will continue to use the one it was provided on init.\\n * Hopefully I make it clear. :)\\n */\\n [].push.apply(filteredModel, $filter(\\'filter\\')(items, filterQuery));\\n return filteredModel;\\n };\\n var containers = $element.children().eq(1).children();\\n dragularService.cleanEnviroment();\\n dragularService([containers[0],containers[1]],{\\n containersModel: [$scope.items1, $scope.items2],\\n containersFilteredModel: [$scope.filteredModel1, $scope.filteredModel2]\\n });\\n }]);\\n\\n
\\n\\n<!-- HTML -->\\n <div class=\\'wrapper\\' ng-controller="NgRepeatFilteredWithModel">\\n <div class="tableRow">\\n <div class=\\'containerVertical\\'>\\n <input ng-model="filter1query" style="margin:10px 10px">\\n </div>\\n <div class=\\'containerVertical\\'>\\n <input ng-model="filter2query" style="margin:10px 10px">\\n </div>\\n </div>\\n <div class=\\'tableRow\\'>\\n <div class=\\'containerVertical\\'>\\n <div ng-repeat="item in getFilteredModel(filteredModel1, items1, filter1query)">{{item.content}}</div>\\n </div>\\n <div class=\\'containerVertical\\'>\\n <div ng-repeat="item in getFilteredModel(filteredModel2, items2, filter2query)">{{item.content}}</div>\\n </div>\\n </div>\\n <div class="tableRow">\\n <div class=\\'containerVertical\\'>\\n <pre>Items1:\\n <br/>{{items1 | json}}</pre>\\n </div>\\n <div class=\\'containerVertical\\'>\\n <pre>Items2:\\n <br/>{{items2 | json}}</pre>\\n </div>\\n </div>\\n </div>\\n
\\n
\\n \\n // HTML:\\n <div class=\\'wrapper\\' ng-controller="NgRepeatWithModel">\\n <div class=\\'containerVertical\\'>\\n <div ng-repeat="item in items">\\n {{item.content}}\\n <button class=\\'cursorDefault\\' ng-click="addItem()">+</button>\\n <button class=\\'cursorDefault\\' ng-click="removeItem()">x</button>\\n </div>\\n </div>\\n </div>\\n
\\n
\\n \\n \\n // JS:\\n controller(\\'NgRepeatWithModel\\', [\\'$scope\\', \\'$element\\', \\'dragularService\\', function TodoCtrl($scope, $element, dragularService) {\\n $scope.items = [{\\n content: \\'Try to add or remove some elements (click on +- buttons), you will see that it is not problem for dragular.\\'\\n }, {\\n content: \\'Item 2\\'\\n }, {\\n content: \\'Item 3\\'\\n }, {\\n content: \\'Item 4\\'\\n }];\\n dragularService($element.children().eq(0).children(), {containersModel: $scope.items});\\n $scope.addItem = function addItem() {\\n var index = $scope.items.indexOf(this.item) + 1;\\n $scope.items.splice(index, 0, {\\n content: this.item.content + \\'-copy\\'\\n });\\n };\\n $scope.removeItem = function removeItem() {\\n var index = $scope.items.indexOf(this.item);\\n $scope.items.splice(index, 1);\\n };\\n }])\\n
\\n
\\n\\n \\n dragularService([document.getElementById(single)], { removeOnSpill: true });\\n
\\n
\\n Items1:\\n\\n
{{items1 | json}}
Items2:\\n\\n
{{items2 | json}}
\\n\\n\\n// JS\\n .controller(\\'RemoveOnSpillWithModel\\', [\\'$scope\\', \\'$element\\', \\'dragularService\\', function TodoCtrl($scope, $element, dragularService) {\\n $scope.items1 = [{\\n content: \\'Move me, but you can only drop me in containers.\\'\\n }, {\\n content: \\'If you try to drop me somewhere other than containers, I\\\\\\'ll die a fiery death.\\'\\n }, {\\n content: \\'Item 3\\'\\n }, {\\n content: \\'Item 4\\'\\n }];\\n $scope.items2 = [{\\n content: \\'You can drop me in the left container.\\'\\n }, {\\n content: \\'Item 6\\'\\n }, {\\n content: \\'Item 7\\'\\n }, {\\n content: \\'Item 8\\'\\n }];\\n var containers = $element.children().eq(0).children();\\n dragularService.cleanEnviroment();\\n dragularService([containers[0],containers[1]],{\\n containersModel: [$scope.items1, $scope.items2],\\n removeOnSpill: true\\n });\\n }])\\n
\\n\\n<!-- HTML -->\\n<div class=\\'wrapper\\' ng-controller="Basic">\\n <div class=\\'tableRow\\'>\\n <div class=\\'containerVertical\\'>\\n <div ng-repeat="item in items1">{{item.content}}</div>\\n </div>\\n <div class=\\'containerVertical\\'>\\n <div ng-repeat="item in items2">{{item.content}}</div>\\n </div>\\n </div>\\n <div class="tableRow">\\n <div class="container">\\n <div>Items1:\\n <br/>{{items1 | json}}</div>\\n </div>\\n <div class="container">\\n <div>Items2:\\n <br/>{{items2 | json}}</div>\\n </div>\\n </div>\\n</div>\\n
\\n
\\n \\n dragularService([document.getElementById(left), document.getElementById(right)], { revertOnSpill: true });\\n
\\n
\\n \\n \\n// JS\\ncontroller(\\'ScrollingDrag\\', [\\'$interval\\', \\'$element\\', \\'dragularService\\', function TodoCtrl($interval, $element, dragularService) {\\n\\n\\n var timer,\\n leftScrollContainer = document.getElementById(\\'leftScroll\\'),\\n rightScrollContainer = document.getElementById(\\'rightScroll\\'),\\n leftTopBar = document.getElementById(\\'leftTopBar\\'),\\n leftBottomBar = document.getElementById(\\'leftBottomBar\\'),\\n rightTopBar = document.getElementById(\\'rightTopBar\\'),\\n rightBottomBar = document.getElementById(\\'rightBottomBar\\');\\n\\n dragularService.cleanEnviroment();\\n dragularService([leftScrollContainer, rightScrollContainer]);\\n\\n registerEvents(leftTopBar, leftScrollContainer, -5);\\n registerEvents(leftBottomBar, leftScrollContainer, 5);\\n registerEvents(rightTopBar, rightScrollContainer, -5);\\n registerEvents(rightBottomBar, rightScrollContainer, 5);\\n\\n function registerEvents(bar, container, inc, speed) {\\n if (!speed) {\\n speed = 20;\\n }\\n angular.element(bar).on(\\'dragularenter\\', function() {\\n container.scrollTop += inc;\\n timer = $interval(function moveScroll() {\\n container.scrollTop += inc;\\n }, speed);\\n });\\n angular.element(bar).on(\\'dragularleave dragularrelease\\', function() {\\n $interval.cancel(timer);\\n });\\n }\\n }])\\n
\\n
\\n \\n \\n<!-- HTML -->\\n<div ng-controller="ScrollingDrag">\\n <div class="containerVertical scrollingDrag">\\n <div class="scrollBar" id="leftTopBar">up</div>\\n <div id="leftScroll" class="scrollingDragInner">\\n <div>Item 1</div>\\n <div>Item 2</div>\\n ...\\n </div>\\n <div class="scrollBar" id="leftBottomBar">down</div>\\n </div>\\n <div class="containerVertical scrollingDrag">\\n <div class="scrollBar" id="rightTopBar">up</div>\\n <div id="rightScroll" class="scrollingDragInner">\\n <div>Item 1</div>\\n <div>Item 2</div>\\n ...\\n </div>\\n <div class="scrollBar" id="rightBottomBar">down</div>\\n </div>\\n </div>\\n
\\n
\\n \\n \\n// CSS\\n.scrollingDrag {\\n width: 45%;\\n display: inline-block;\\n}\\n\\n.scrollingDragInner {\\n max-height: 200px;\\n overflow-y: auto;\\n}\\n\\n#rightTopBar,\\n#rightBottomBar {\\n background: transparent;\\n position: relative;\\n height: 20px;\\n}\\n\\n#rightTopBar {\\n top: 10px;\\n}\\n\\n#rightBottomBar {\\n bottom: 10px;\\n}\\n\\ndiv.scrollBar {\\n background: yellow;\\n text-align: center;\\n padding: 1px;\\n}\\n\\n
\\n
\\n\\n \\n
\\n \\n \\nBrowser support includes every sane browser and **IE7+**. _(Granted you polyfill the functional `Array` methods in ES5)_
\\nI 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.
\\nActual version 4.4.6 is based on dragula 3.6.3 and tested with angular 1.5.5.
\\nIt's important to us that you feel you can contribute towards the evolution of Dragular. This can take many forms: from helping to fix bugs or improve the docs, to adding in new features to the source. This guide should help you in making that process as smooth as possible.
\\nBefore contributing, please read the code of conduct.
\\nGitHub Issues is the place to report bugs you may have found in either the core library or any of the examples that are part of the repository. When submitting a bug please do the following:
\\n1. Search for existing issues. Your bug may have already been fixed or addressed in a development branch version of Dragular, so be sure to search the issues first before putting in a duplicate issue.
\\n2. Not sure if it's a bug?. Then please ask via issues and tag it [question].
\\n3. Create an isolated and reproducible test case. If you are reporting a bug, make sure you also have a minimal, runnable, code example that reproduces the problem you have.
\\n4. Include a live example. After narrowing your code down to only the problem areas, make use of Codepen, jsBin, or a link to your live site so that we can view a live example of the problem. (you can start by forking this codepen)
\\n5. Share as much information as possible. Include browser version affected, your OS, version of the library, steps to reproduce, etc. "X isn't working!!!1!" will probably just be closed.
\\nThe dev branch of Dragular is our 'current working' version. It is always ahead of the master branch in terms of features and fixes. However it's also bleeding-edge and experimental and we cannot and do not guarantee it will compile or work for you. Very often we have to break things for a few days while we rebuild and patch. So by all means please export the dev branch and contribute towards it, indeed that is where all Pull Requests should be sent, but do so understanding the API may change beneath you.
\\nTo take advantage of our npm build script and jshint config it will be easiest for you if you have node.js installed locally.
\\nYou can download node.js from nodejs.org.
\\nAfter that you can clone the repository and run npm i
inside the cloned folder. This will install dependencies necessary for building the project. For development workflow automation dragular uses gulp >= 3.9.0
. Before starting development, make sure that gulp
is installed on your machine globally: npm i -g gulp
.
There are several gulp tasks that are used for generating different builds:
\\ngulp dev
- Serves files with BrowserSync server, watches & automatically refreshes connected browsers on changes, generates non-minified but concatenated styles & scripts from the dragular source.gulp dev:docs
- Does exactly the same as gulp dev
, except it works with the documentation source.gulp build
- Concatenates and minifies dragular source files.gulp build:docs
- Concatenates and minifies documentation source files.gulp lint
& gulp lint:docs
- Lint JavaScript files.Once that is ready, make your changes and submit a Pull Request:
\\nSend Pull Requests to the dev
branch. All Pull Requests must be sent to the dev
branch, master
is the latest release and PRs to that branch will be closed.
Ensure changes are jshint validated. Our JSHint configuration file is provided in the repository and you should check against it before submitting.
\\nOnly commit relevant changes. Don't include changes that are not directly relevant to the fix you are making. The more focused a PR is, the faster it will get attention and be merged. Extra files changing only whitespace or trash files will likely get your PR closed.
\\nDependencies for building from source and running tests:
\\nIf your PR is doing little more than changing the Dragular source code into a format / coding style that you prefer then we will automatically close it. All PRs must adhere to the coding style already set-out across the lines of code in Dragular. Your personal preferences for how things should "look" or be structured do not apply here, sorry. PRs should fix bugs, fix documentation or add features. No changes for the sake of change.
\\nThat is fine too. While Pull Requests are the best thing in the world for us, they are not the only way to help. You're welcome to post fixes to our forum or even just email them to us. All we ask is that you still adhere to the guidelines presented here re: JSHint, etc.
\\n\");}]);\n\n/***/ })\n/******/ ])\n});\n;"]} \ No newline at end of file diff --git a/docs/src/examples/templates.js b/docs/src/examples/templates.js index ac670456..c276f374 100644 --- a/docs/src/examples/templates.js +++ b/docs/src/examples/templates.js @@ -1,7 +1,7 @@ -'use strict'; module.exports = angular.module("templates", []).run(["$templateCache", function($templateCache) {$templateCache.put("exampleBasic/exampleBasic.html","\n\n\n// JS\n controller(\'Basic\', [\'$element\', \'dragularService\', function TodoCtrl($element, dragularService) {\n dragularService(\'.containerVertical\');\n }])\n
\n\n// CSS\n.clickedClass {\n background-color: orange !important;\n}\n
\n\n<!-- HTML -->\n <div class=\'wrapper\' ng-controller="Basic">\n <div class=\'containerVertical\'>\n <div>Move me, but you can only drop me in one of these containers.</div>\n <div>If you try to drop me somewhere other than these containers, I\'ll just come back.</div>\n <div>Item 3.</div>\n <div>Item 6.</div>\n </div>\n <div class=\'containerVertical\'>\n <div>You can drop me in the left container, otherwise I\'ll stay here.</div>\n <div ng-click=\"clicked = !clicked\" ng-class=\"clicked && \'clickedClass\'\">Try to click me, dragular distinguish drag from click</div>\n <div>Item 5.</div>\n </div>\n</div>\n
\n
download dragular.js and dragular.css from dist folder
\nOR clone git
\n\ngit clone http://github.com/luckylooke/dragular.git\n
\nOR use npm
\n\n[sudo] npm install dragular\n
\nOR use bower
\n\nbower install dragular\n
\nAND include files into your project
\n\n<link href=\'styles/dragular.css\' rel=\'stylesheet\' type=\'text/css\' />\n<script src=\'scripts/dragular.js\'></script>\n
\nAND put dragularModule into dependency array
\n\nvar app = angular.module(\'myApp\', [\'dragularModule\', \'otherDependencies\']);\n
\nDONE :)
\n"); -$templateCache.put("exampleBoundingBox/exampleBoundingBox.html","\n \n dragularService([$element.children(), {\n boundingBox: $element\n });\n
\n
\n download dragular.js and dragular.css from dist folder
\nOR clone git
\n\ngit clone http://github.com/luckylooke/dragular.git\n
\nOR use npm
\n\n[sudo] npm install dragular\n
\nOR use bower
\n\nbower install dragular\n
\nAND include files into your project
\n\n<link href=\'styles/dragular.css\' rel=\'stylesheet\' type=\'text/css\' />\n<script src=\'scripts/dragular.js\'></script>\n
\nAND put dragularModule into dependency array
\n\nvar app = angular.module(\'myApp\', [\'dragularModule\', \'otherDependencies\']);\n
\nDONE :)
\n"); +$templateCache.put("exampleBasic/exampleBasic.html","\n\n\n// JS\n controller(\'Basic\', [\'$element\', \'dragularService\', function TodoCtrl($element, dragularService) {\n dragularService(\'.containerVertical\');\n }])\n
\n\n// CSS\n.clickedClass {\n background-color: orange !important;\n}\n
\n\n<!-- HTML -->\n <div class=\'wrapper\' ng-controller="Basic">\n <div class=\'containerVertical\'>\n <div>Move me, but you can only drop me in one of these containers.</div>\n <div>If you try to drop me somewhere other than these containers, I\'ll just come back.</div>\n <div>Item 3.</div>\n <div>Item 6.</div>\n </div>\n <div class=\'containerVertical\'>\n <div>You can drop me in the left container, otherwise I\'ll stay here.</div>\n <div ng-click=\"clicked = !clicked\" ng-class=\"clicked && \'clickedClass\'\">Try to click me, dragular distinguish drag from click</div>\n <div>Item 5.</div>\n </div>\n</div>\n
\n
Items1:\n\n
{{items1 | json}}
Items2:\n\n
{{items2 | json}}
\n\n\n// JS\n controller(\'BasicModel\', [\'$scope\', \'$element\', \'dragularService\', function TodoCtrl($scope, $element, dragularService) {\n $scope.items1 = [{\n content: \'Move me, but you can only drop me in one of these containers.\'\n }, {\n content: \'If you try to drop me somewhere other than these containers, I\\\'ll just come back.\'\n }, {\n content: \'Item 3\'\n }, {\n content: \'Item 4\'\n }];\n $scope.items2 = [{\n content: \'Item 5\'\n }, {\n content: \'Item 6\'\n }, {\n content: \'Item 7\'\n }, {\n content: \'Item 8\'\n }];\n var containers = $element.children().children();\n dragularService([containers[0],containers[1]],{\n containersModel: [$scope.items1, $scope.items2]\n });\n }])\n
\n\n<!-- HTML -->\n<div class=\'wrapper\' ng-controller="Basic">\n <div class=\'tableRow\'>\n <div class=\'containerVertical\'>\n <div ng-repeat="item in items1">{{item.content}}</div>\n </div>\n <div class=\'containerVertical\'>\n <div ng-repeat="item in items2">{{item.content}}</div>\n </div>\n </div>\n <div class="tableRow">\n <div class="container">\n <div>Items1:\n <br/>{{items1 | json}}</div>\n </div>\n <div class="container">\n <div>Items2:\n <br/>{{items2 | json}}</div>\n </div>\n </div>\n</div>\n
\n
\n \n dragularService([$element.children(), {\n boundingBox: $element\n });\n
\n
\n \n \n dragularService([$element.children()[0].children(), {\n boundingBox: $element.children()[0],\n lockX: true\n });\n
\n
\n \n \n dragularService([$element.children()[0].children(), {\n boundingBox: $element.children()[0],\n lockY: true\n });\n
\n
\n \n\n\n// JS\n controller(\'Copy\', [\'$element\', \'dragularService\', function TodoCtrl($element, dragularService) {\n dragularService($element.children(), {\n copy: true\n });\n }])\n
\n\n<!-- HTML -->\n<div class=\'wrapper\' ng-controller="Copy" ng-hide="globals.showModelExamples">\n <div id=\'left2\' class=\'containerVertical\'>\n <div>Move me, and make copy on drop.</div>\n <div>If you try to drop me somewhere other than these containers, I\'ll just come back.</div>\n </div>\n <div id=\'right2\' class=\'containerVertical\'>\n <div>You can drop me in the left container, otherwise I\'ll stay here.</div>\n </div>\n </div>\n
\n