From dea6f8ac521273b3a368a1c308953203279d74b3 Mon Sep 17 00:00:00 2001 From: Ctibor Laky Date: Mon, 26 Jun 2017 22:04:44 +0200 Subject: [PATCH 1/2] fixing #148 --- changelog.md | 3 +++ dist/dragular.js | 7 ++++++- dist/dragular.min.js | 2 +- dist/dragular.min.js.map | 2 +- docs/dist/examples.js | 13 ++++++++++--- docs/dist/examples.min.js | 6 +++--- docs/dist/examples.min.js.map | 2 +- .../examples/partials/autogenerated/contribute.html | 2 +- docs/src/examples/templates.js | 4 ++-- src/dragularService.js | 9 ++++++++- 10 files changed, 36 insertions(+), 14 deletions(-) diff --git a/changelog.md b/changelog.md index e1111c98..ebe196fd 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,6 @@ +# 4.4.3 Spy Kids +- fixed #148 - model not updated on spill + # 4.4.2 The Model - fixed #138 - dynamic model via directive doesn't work properly diff --git a/dist/dragular.js b/dist/dragular.js index d32cb1d8..04e19074 100644 --- a/dist/dragular.js +++ b/dist/dragular.js @@ -751,7 +751,12 @@ return /******/ (function(modules) { // webpackBootstrap while ( target && !accepted() ) { target = getParent( target ); } - shared.targetCtx = targetCtx || {}; + + // bugfix #148 model not updated on spill + if ( targetCtx ){ + shared.targetCtx = targetCtx; + } + return target; function accepted() { diff --git a/dist/dragular.min.js b/dist/dragular.min.js index 16df31a4..cb9368e6 100644 --- a/dist/dragular.min.js +++ b/dist/dragular.min.js @@ -1,2 +1,2 @@ -!function(e,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var t=n();for(var r in t)("object"==typeof exports?exports:e)[r]=t[r]}}(this,function(){return function(e){function n(r){if(t[r])return t[r].exports;var o=t[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var t={};return n.m=e,n.c=t,n.p="",n(0)}([function(e,n,t){"use strict";var r=t(1),o=t(2);e.exports="dragularModule",angular.module("dragularModule",[]).factory("dragularService",o).directive("dragular",r)},function(e,n){"use strict";var t=function(e){return{restrict:"A",link:function(n,t,r){function o(e){try{return JSON.parse(e)}catch(n){return}}var i=n.$eval(r.dragular)||o(r.dragular)||{};r.dragularModel&&(i.containersModel=r.dragularModel,i.scope||(i.scope=n)),r.dragularNameSpace&&(i.nameSpace=r.dragularNameSpace.split(" ")),r.dragularOnInit&&(i.onInit=n.$eval(r.dragularOnInit)),e(t[0],i)}}};t.$inject=["dragularService"],e.exports=t},function(e,n){"use strict";var t={classesCache:{},containersCtx:{},containers:{},mirror:null,source:null,item:null,copy:null,sourceItem:null,sourceModel:null,sourceFilteredModel:null,target:null,targetCtx:null,targetModel:null,lastDropTarget:null,offsetX:null,offsetY:null,moveX:null,moveY:null,offsetXr:null,offsetYb:null,clientX:null,clientY:null,mirrorWidth:null,mirrorHeight:null,initialSibling:null,currentSibling:null,initialIndex:null,currentIndex:null,tempModel:null,dragOverEvents:{},lastElementBehindCursor:null,grabbed:null},r=function(e,n){function r(r,d){function x(){1!==arguments.length||B(r)||angular.isElement(r)||r[0]||"string"==typeof r?"string"==typeof r&&(ge=document.querySelectorAll(r)):(fe=r||{},ge=[]),me=fe.copyOptions?angular.copy(fe):fe}function b(){var e=angular.extend({},xe,me);angular.extend(me,e),me.classes&&(e=angular.extend({},ve,me.classes),angular.extend(me.classes,e)),me.eventNames&&(e=angular.extend({},he,me.eventNames),angular.extend(me.eventNames,e))}function N(){h(me.boundingBox)||(me.boundingBox=!1),me.containers&&(ge=me.containers),me.containers=o(ge,!1,me.scope),me.containersModel=o(me.containersModel,!0,me.scope),B(me.containersFilteredModel)?me.containersFilteredModel=B(me.containersFilteredModel[0])?me.containersFilteredModel:[me.containersFilteredModel]:me.containersFilteredModel=[],me.nameSpace||(me.nameSpace=["dragularCommon"]),B(me.nameSpace)||(me.nameSpace=[me.nameSpace]),me.nameSpace.forEach(function(e){t.containers[e]||(t.containers[e]=[],t.containersCtx[e]=[]);for(var n=_(me).length,r=t.containers[e].length,o=0;oi.left+t.offsetX&&ri.top+t.offsetY&&ot)return o;if(!l&&i.top>r)return o}return null}function i(){var e=n.getBoundingClientRect();return a(l?t>e.left+g(e)/2:r>e.top+f(e)/2)}function a(e){return e?v(n):n}var l="horizontal"===me.direction;return n!==e?i():o()}function V(e,n,t){var r,o=e||{},i=o.className;return o.className+=" "+me.classes.hide,r=O.elementFromPoint(n,t),o.className=i,r}function Z(e){if(!e)return!1;for(var n=me.nameSpace.length;n--;)if(t.containers[me.nameSpace[n]].indexOf(e)!==-1)return!0;return me.isContainer(e)?(t.tempModel=me.isContainerModel(e),!0):(t.tempModel=null,!1)}function _(e){return ne("containers",e)}function ee(e){return ne("containersModel",e,!0)}function ne(e,n,r){return w(n[e])?o(n[e](n===me?ye:null,t),r,n.scope):n[e]}function te(e){if(ye.dragging){var n=arguments.length>0?e:pe(me.revertOnSpill),r=C(t.item),o=J(r);o||t.copy||!n||t.source.insertBefore(t.item,t.initialSibling),!t.sourceModel||t.copy||n?me.scope&&(o||n)&&me.scope.$emit(me.eventNames.dragularcancel,t.item,t.source,t.sourceModel,t.initialIndex):oe(t.item,r),(!t.sourceModel||t.copy||n||o)&&ae()}}function re(e){if(W(),ye.dragging){e.originalEvent&&(e=e.originalEvent),t.clientX=E("clientX",e),t.clientY=E("clientY",e);var n=V(t.mirror,t.clientX,t.clientY),r=K(n,t.clientX,t.clientY);r&&(t.copy&&pe(me.copySortSource)||!t.copy||r!==t.source)?oe(t.item,r):pe(me.removeOnSpill)?ie():te(),t.target=null,t.lastElementBehindCursor&&X(t.lastElementBehindCursor,t.dragOverEvents.dragularrelease,n),me.scope&&me.scope.$emit(me.eventNames.dragularrelease,t.item,t.source,e)}}function oe(r,o){function a(){if(_(me).forEach(function(e){i(e,"off","mousedown",A),i(e,"on","mousedown",A)}),me.compileItemOnDrop){var e=angular.element(o).scope?angular.element(o).scope():me.scope;e&&e.$applyAsync(function(){var i=n(t.copy?l.cloneNode(!0):l)(e);r.parentNode===o&&o.removeChild(r),o.insertBefore(i[0],c),ae()})}me.scope&&(J(o)?me.scope.$emit(me.eventNames.dragularcancel,r,t.source,t.sourceModel,t.initialIndex):me.scope.$emit(me.eventNames.dragulardrop,r,o,t.source,t.sourceModel,t.initialIndex,t.targetModel,u)),me.compileItemOnDrop||ae()}if(!r)return void ae();var l=t.sourceItem,c=t.currentSibling,u=I(r,o);t.copy&&o===t.source&&C(r)&&pe(me.copySortSource)&&r.parentNode.removeChild(t.sourceItem),t.sourceModel&&!J(o)?(t.targetCtx&&t.targetCtx.fm&&(u=t.targetCtx.m.indexOf(t.targetCtx.fm[u])),t.sourceFilteredModel&&(t.initialIndex=t.sourceModel.indexOf(t.sourceFilteredModel[t.initialIndex])),e.$applyAsync(function(){t.sourceModel&&(o===t.source?t.sourceModel.splice(u,0,t.sourceModel.splice(t.initialIndex,1)[0]):(t.dropElmModel=t.copy&&!me.dontCopyModel?angular.copy(t.sourceModel[t.initialIndex]):t.sourceModel[t.initialIndex],t.tempModel?t.targetModel=t.tempModel:t.targetModel=t.targetCtx&&t.targetCtx.m||t.sourceModel,r.parentNode.removeChild(r),t.copy||t.sourceModel.splice(t.initialIndex,1),t.targetModel&&t.targetModel.splice(u,0,t.dropElmModel)),C(r)&&r.parentNode.removeChild(r),a())})):a()}function ie(){if(ye.dragging){var n=C(t.item);n&&n.removeChild(t.item),t.sourceModel&&e.$applyAsync(function(){t.sourceModel.splice(t.initialIndex,1),ae()}),me.scope&&me.scope.$emit(t.copy?me.eventNames.dragularcancel:me.eventNames.dragularremove,t.item,n,t.sourceModel,t.initialIndex),t.sourceModel||ae()}}function ae(){W(),se(),t.item&&M(t.item,me.classes.transit),ye.dragging=!1,pe(me.removeOnSpill)===!0&&q(),me.scope&&(t.lastDropTarget&&me.scope.$emit(me.eventNames.dragularout,t.item,t.lastDropTarget,t.source),me.scope.$emit(me.eventNames.dragulardragend,t.item)),t.source=t.item=t.sourceItem=t.initialSibling=t.currentSibling=t.sourceModel=null,t.initialIndex=t.currentIndex=t.lastDropTarget=t.tempModel=t.targetModel=null,t.dropElmModel=t.targetCtx=t.copy=t.moveX=t.moveY=null}function le(){$(!0),ce(me.containers),re({})}function ce(n){e.$applyAsync(function(){var e=B(n)?n:c(n);e.forEach(function(e){angular.forEach(me.nameSpace,function(n){var r;r=t.containers[n].indexOf(e),t.containers[n].splice(r,1),t.containersCtx[n].splice(r,1)})})})}function ue(e){if(t.target){e.originalEvent&&(e=e.originalEvent);var n=t.target.scrollTop;t.target.scrollTop+=e.deltaY,n!==t.target.scrollTop&&(e.stopPropagation(),e.preventDefault())}}function se(){t.mirror&&(M(O.body,me.classes.unselectable),i(T,"off","mousemove",z),i(t.mirror,"off","wheel",ue),C(t.mirror)&&t.mirror.parentNode.removeChild(t.mirror),t.mirror=null)}function de(e){o(e,!0,me.scope)}var me,ge=r||[],fe=d||{},pe=Y,ve={mirror:"gu-mirror",hide:"gu-hide",unselectable:"gu-unselectable",transit:"gu-transit"},he={dragularenter:"dragularenter",dragularleave:"dragularleave",dragularrelease:"dragularrelease",dragularcloned:"dragularcloned",dragulardrag:"dragulardrag",dragularcancel:"dragularcancel",dragulardrop:"dragulardrop",dragularremove:"dragularremove",dragulardragend:"dragulardragend",dragularshadow:"dragularshadow",dragularover:"dragularover",dragularout:"dragularout"},xe={copyOptions:!1,classes:ve,eventNames:he,containers:!1,containersModel:!1,containersFilteredModel:!1,isContainer:a,isContainerModel:p,isContainerAccepts:l,moves:l,accepts:l,canBeAccepted:l,copy:!1,copySortSource:!1,dontCopyModel:!1,invalid:a,revertOnSpill:!1,removeOnSpill:!1,lockX:!1,lockY:!1,boundingBox:!1,mirrorContainer:O.body,ignoreInputTextSelection:!0,compileItemOnDrop:!1,onInit:!1},ye={containers:t.containers,containersCtx:t.containersCtx,sanitizeContainersModel:de,sanitizeContainers:o,isContainer:Z,start:P,end:R,cancel:te,remove:ie,destroy:le,dragging:!1};return x(),b(),N(),$(),me.onInit&&me.onInit(ye,me),ye}function o(e,n,t){if(w(e))return e;if(B(e))return n?B(e[0])?e:[e]:e;if("string"==typeof e&&t){var r=t.$eval(e);return w(r)?r:function(){return t.$eval(e)}}return e?c(e):[]}function i(e,n,t,r){var o={mouseup:"touchend",mousedown:"touchstart",mousemove:"touchmove"},i={mouseup:"pointerup",mousedown:"pointerdown",mousemove:"pointermove"},a={mouseup:"MSPointerUp",mousedown:"MSPointerDown",mousemove:"MSPointerMove"},l=angular.element(e);if(e.addEventListener){var c={on:"addEventListener",off:"removeEventListener"};e[c[n]](t,r,{passive:!1}),e[c[n]](o[t],r,{passive:!1})}else"undefined"!=typeof navigator&&navigator.pointerEnabled&&i[t]?l[n](i[t],r):"undefined"!=typeof navigator&&navigator.msPointerEnabled&&a[t]?l[n](a[t],r):o[t]&&l[n](o[t],r),l[n](t,r)}function a(){return!1}function l(){return!0}function c(e,n){return B(e)?e:e.length?Array.prototype.slice.call(e,n):[e]}function u(e){if(e.touches)return e.touches.length;if(e.originalEvent&&e.originalEvent.touches)return e.originalEvent.touches.length;if(void 0!==e.which&&0!==e.which)return e.which;if(void 0!==e.buttons)return e.buttons;var n=e.button;return void 0!==n?1&n?1:2&n?3:4&n?2:0:void 0}function s(e){e.originalEvent&&(e=e.originalEvent),t.grabbed&&e.preventDefault()}function d(e,n){return"undefined"!=typeof window[n]?window[n]:T.clientHeight?T[e]:O.body[e]}function m(e){var n=e.getBoundingClientRect(),t=d("scrollTop","pageYOffset"),r=d("scrollLeft","pageXOffset");return{left:n.left+r,right:n.right+r,top:n.top+t,bottom:n.bottom+t}}function g(e){return e.width||e.right-e.left}function f(e){return e.height||e.bottom-e.top}function p(){return{}}function v(e){function n(){var n=e;do n=n.nextSibling;while(n&&1!==n.nodeType);return n}if(e)return e.nextElementSibling||n()}function h(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName}function x(e){var n=t.classesCache[e];return n?n.lastIndex=0:t.classesCache[e]=n=new RegExp("(?:^|\\s)"+e+"(?:\\s|$)","g"),n}function y(e,n){var t=e.className;t.length?x(n).test(t)||(e.className+=" "+n):e.className=n}function M(e,n){e.className=e.className.replace(x(n)," ").trim()}function b(e){return e.targetTouches&&e.targetTouches.length?e.targetTouches[0]:e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e}function E(e,n){var t=b(n),r={pageX:"clientX",pageY:"clientY"};return e in r&&!(e in t)&&r[e]in t&&(e=r[e]),!t.type||t.type.indexOf("touch")<0?t[e]:t.type.indexOf("end")===-1&&t.originalEvent.touches[0][e.replace("client","page")]}function C(e){return e.parentNode===document?null:e.parentNode}function S(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName||"SELECT"===e.tagName||N(e)}function N(e){return!!e&&("false"!==e.contentEditable&&("true"===e.contentEditable||N(C(e))))}function I(e,n){return Array.prototype.indexOf.call(angular.element(n).children(),e)}function X(e,n,r){e&&(t.extra=r,e.dispatchEvent?e.dispatchEvent(n):e.fireEvent("on"+n.eventType,n))}function Y(e,n,r){return w(e)?!!e.apply(r||this,n||t):!!e}var O=document,T=O.documentElement,B=Array.isArray,w=angular.isFunction;return r.cleanEnviroment=function(){t.classesCache={},t.containersCtx={},t.containers={},t.mirror=void 0},r.shared=t,r};r.$inject=["$rootScope","$compile"],e.exports=r}])}); +!function(e,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var t=n();for(var r in t)("object"==typeof exports?exports:e)[r]=t[r]}}(this,function(){return function(e){function n(r){if(t[r])return t[r].exports;var o=t[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var t={};return n.m=e,n.c=t,n.p="",n(0)}([function(e,n,t){"use strict";var r=t(1),o=t(2);e.exports="dragularModule",angular.module("dragularModule",[]).factory("dragularService",o).directive("dragular",r)},function(e,n){"use strict";var t=function(e){return{restrict:"A",link:function(n,t,r){function o(e){try{return JSON.parse(e)}catch(n){return}}var i=n.$eval(r.dragular)||o(r.dragular)||{};r.dragularModel&&(i.containersModel=r.dragularModel,i.scope||(i.scope=n)),r.dragularNameSpace&&(i.nameSpace=r.dragularNameSpace.split(" ")),r.dragularOnInit&&(i.onInit=n.$eval(r.dragularOnInit)),e(t[0],i)}}};t.$inject=["dragularService"],e.exports=t},function(e,n){"use strict";var t={classesCache:{},containersCtx:{},containers:{},mirror:null,source:null,item:null,copy:null,sourceItem:null,sourceModel:null,sourceFilteredModel:null,target:null,targetCtx:null,targetModel:null,lastDropTarget:null,offsetX:null,offsetY:null,moveX:null,moveY:null,offsetXr:null,offsetYb:null,clientX:null,clientY:null,mirrorWidth:null,mirrorHeight:null,initialSibling:null,currentSibling:null,initialIndex:null,currentIndex:null,tempModel:null,dragOverEvents:{},lastElementBehindCursor:null,grabbed:null},r=function(e,n){function r(r,d){function x(){1!==arguments.length||B(r)||angular.isElement(r)||r[0]||"string"==typeof r?"string"==typeof r&&(ge=document.querySelectorAll(r)):(fe=r||{},ge=[]),me=fe.copyOptions?angular.copy(fe):fe}function b(){var e=angular.extend({},xe,me);angular.extend(me,e),me.classes&&(e=angular.extend({},ve,me.classes),angular.extend(me.classes,e)),me.eventNames&&(e=angular.extend({},he,me.eventNames),angular.extend(me.eventNames,e))}function N(){h(me.boundingBox)||(me.boundingBox=!1),me.containers&&(ge=me.containers),me.containers=o(ge,!1,me.scope),me.containersModel=o(me.containersModel,!0,me.scope),B(me.containersFilteredModel)?me.containersFilteredModel=B(me.containersFilteredModel[0])?me.containersFilteredModel:[me.containersFilteredModel]:me.containersFilteredModel=[],me.nameSpace||(me.nameSpace=["dragularCommon"]),B(me.nameSpace)||(me.nameSpace=[me.nameSpace]),me.nameSpace.forEach(function(e){t.containers[e]||(t.containers[e]=[],t.containersCtx[e]=[]);for(var n=_(me).length,r=t.containers[e].length,o=0;oi.left+t.offsetX&&ri.top+t.offsetY&&ot)return o;if(!l&&i.top>r)return o}return null}function i(){var e=n.getBoundingClientRect();return a(l?t>e.left+g(e)/2:r>e.top+f(e)/2)}function a(e){return e?v(n):n}var l="horizontal"===me.direction;return n!==e?i():o()}function V(e,n,t){var r,o=e||{},i=o.className;return o.className+=" "+me.classes.hide,r=O.elementFromPoint(n,t),o.className=i,r}function Z(e){if(!e)return!1;for(var n=me.nameSpace.length;n--;)if(t.containers[me.nameSpace[n]].indexOf(e)!==-1)return!0;return me.isContainer(e)?(t.tempModel=me.isContainerModel(e),!0):(t.tempModel=null,!1)}function _(e){return ne("containers",e)}function ee(e){return ne("containersModel",e,!0)}function ne(e,n,r){return w(n[e])?o(n[e](n===me?ye:null,t),r,n.scope):n[e]}function te(e){if(ye.dragging){var n=arguments.length>0?e:pe(me.revertOnSpill),r=C(t.item),o=J(r);o||t.copy||!n||t.source.insertBefore(t.item,t.initialSibling),!t.sourceModel||t.copy||n?me.scope&&(o||n)&&me.scope.$emit(me.eventNames.dragularcancel,t.item,t.source,t.sourceModel,t.initialIndex):oe(t.item,r),(!t.sourceModel||t.copy||n||o)&&ae()}}function re(e){if(W(),ye.dragging){e.originalEvent&&(e=e.originalEvent),t.clientX=E("clientX",e),t.clientY=E("clientY",e);var n=V(t.mirror,t.clientX,t.clientY),r=K(n,t.clientX,t.clientY);r&&(t.copy&&pe(me.copySortSource)||!t.copy||r!==t.source)?oe(t.item,r):pe(me.removeOnSpill)?ie():te(),t.target=null,t.lastElementBehindCursor&&X(t.lastElementBehindCursor,t.dragOverEvents.dragularrelease,n),me.scope&&me.scope.$emit(me.eventNames.dragularrelease,t.item,t.source,e)}}function oe(r,o){function a(){if(_(me).forEach(function(e){i(e,"off","mousedown",A),i(e,"on","mousedown",A)}),me.compileItemOnDrop){var e=angular.element(o).scope?angular.element(o).scope():me.scope;e&&e.$applyAsync(function(){var i=n(t.copy?l.cloneNode(!0):l)(e);r.parentNode===o&&o.removeChild(r),o.insertBefore(i[0],c),ae()})}me.scope&&(J(o)?me.scope.$emit(me.eventNames.dragularcancel,r,t.source,t.sourceModel,t.initialIndex):me.scope.$emit(me.eventNames.dragulardrop,r,o,t.source,t.sourceModel,t.initialIndex,t.targetModel,u)),me.compileItemOnDrop||ae()}if(!r)return void ae();var l=t.sourceItem,c=t.currentSibling,u=I(r,o);t.copy&&o===t.source&&C(r)&&pe(me.copySortSource)&&r.parentNode.removeChild(t.sourceItem),t.sourceModel&&!J(o)?(t.targetCtx&&t.targetCtx.fm&&(u=t.targetCtx.m.indexOf(t.targetCtx.fm[u])),t.sourceFilteredModel&&(t.initialIndex=t.sourceModel.indexOf(t.sourceFilteredModel[t.initialIndex])),e.$applyAsync(function(){t.sourceModel&&(o===t.source?t.sourceModel.splice(u,0,t.sourceModel.splice(t.initialIndex,1)[0]):(t.dropElmModel=t.copy&&!me.dontCopyModel?angular.copy(t.sourceModel[t.initialIndex]):t.sourceModel[t.initialIndex],t.tempModel?t.targetModel=t.tempModel:t.targetModel=t.targetCtx&&t.targetCtx.m||t.sourceModel,r.parentNode.removeChild(r),t.copy||t.sourceModel.splice(t.initialIndex,1),t.targetModel&&t.targetModel.splice(u,0,t.dropElmModel)),C(r)&&r.parentNode.removeChild(r),a())})):a()}function ie(){if(ye.dragging){var n=C(t.item);n&&n.removeChild(t.item),t.sourceModel&&e.$applyAsync(function(){t.sourceModel.splice(t.initialIndex,1),ae()}),me.scope&&me.scope.$emit(t.copy?me.eventNames.dragularcancel:me.eventNames.dragularremove,t.item,n,t.sourceModel,t.initialIndex),t.sourceModel||ae()}}function ae(){W(),se(),t.item&&M(t.item,me.classes.transit),ye.dragging=!1,pe(me.removeOnSpill)===!0&&q(),me.scope&&(t.lastDropTarget&&me.scope.$emit(me.eventNames.dragularout,t.item,t.lastDropTarget,t.source),me.scope.$emit(me.eventNames.dragulardragend,t.item)),t.source=t.item=t.sourceItem=t.initialSibling=t.currentSibling=t.sourceModel=null,t.initialIndex=t.currentIndex=t.lastDropTarget=t.tempModel=t.targetModel=null,t.dropElmModel=t.targetCtx=t.copy=t.moveX=t.moveY=null}function le(){$(!0),ce(me.containers),re({})}function ce(n){e.$applyAsync(function(){var e=B(n)?n:c(n);e.forEach(function(e){angular.forEach(me.nameSpace,function(n){var r;r=t.containers[n].indexOf(e),t.containers[n].splice(r,1),t.containersCtx[n].splice(r,1)})})})}function ue(e){if(t.target){e.originalEvent&&(e=e.originalEvent);var n=t.target.scrollTop;t.target.scrollTop+=e.deltaY,n!==t.target.scrollTop&&(e.stopPropagation(),e.preventDefault())}}function se(){t.mirror&&(M(O.body,me.classes.unselectable),i(T,"off","mousemove",z),i(t.mirror,"off","wheel",ue),C(t.mirror)&&t.mirror.parentNode.removeChild(t.mirror),t.mirror=null)}function de(e){o(e,!0,me.scope)}var me,ge=r||[],fe=d||{},pe=Y,ve={mirror:"gu-mirror",hide:"gu-hide",unselectable:"gu-unselectable",transit:"gu-transit"},he={dragularenter:"dragularenter",dragularleave:"dragularleave",dragularrelease:"dragularrelease",dragularcloned:"dragularcloned",dragulardrag:"dragulardrag",dragularcancel:"dragularcancel",dragulardrop:"dragulardrop",dragularremove:"dragularremove",dragulardragend:"dragulardragend",dragularshadow:"dragularshadow",dragularover:"dragularover",dragularout:"dragularout"},xe={copyOptions:!1,classes:ve,eventNames:he,containers:!1,containersModel:!1,containersFilteredModel:!1,isContainer:a,isContainerModel:p,isContainerAccepts:l,moves:l,accepts:l,canBeAccepted:l,copy:!1,copySortSource:!1,dontCopyModel:!1,invalid:a,revertOnSpill:!1,removeOnSpill:!1,lockX:!1,lockY:!1,boundingBox:!1,mirrorContainer:O.body,ignoreInputTextSelection:!0,compileItemOnDrop:!1,onInit:!1},ye={containers:t.containers,containersCtx:t.containersCtx,sanitizeContainersModel:de,sanitizeContainers:o,isContainer:Z,start:P,end:R,cancel:te,remove:ie,destroy:le,dragging:!1};return x(),b(),N(),$(),me.onInit&&me.onInit(ye,me),ye}function o(e,n,t){if(w(e))return e;if(B(e))return n?B(e[0])?e:[e]:e;if("string"==typeof e&&t){var r=t.$eval(e);return w(r)?r:function(){return t.$eval(e)}}return e?c(e):[]}function i(e,n,t,r){var o={mouseup:"touchend",mousedown:"touchstart",mousemove:"touchmove"},i={mouseup:"pointerup",mousedown:"pointerdown",mousemove:"pointermove"},a={mouseup:"MSPointerUp",mousedown:"MSPointerDown",mousemove:"MSPointerMove"},l=angular.element(e);if(e.addEventListener){var c={on:"addEventListener",off:"removeEventListener"};e[c[n]](t,r,{passive:!1}),e[c[n]](o[t],r,{passive:!1})}else"undefined"!=typeof navigator&&navigator.pointerEnabled&&i[t]?l[n](i[t],r):"undefined"!=typeof navigator&&navigator.msPointerEnabled&&a[t]?l[n](a[t],r):o[t]&&l[n](o[t],r),l[n](t,r)}function a(){return!1}function l(){return!0}function c(e,n){return B(e)?e:e.length?Array.prototype.slice.call(e,n):[e]}function u(e){if(e.touches)return e.touches.length;if(e.originalEvent&&e.originalEvent.touches)return e.originalEvent.touches.length;if(void 0!==e.which&&0!==e.which)return e.which;if(void 0!==e.buttons)return e.buttons;var n=e.button;return void 0!==n?1&n?1:2&n?3:4&n?2:0:void 0}function s(e){e.originalEvent&&(e=e.originalEvent),t.grabbed&&e.preventDefault()}function d(e,n){return"undefined"!=typeof window[n]?window[n]:T.clientHeight?T[e]:O.body[e]}function m(e){var n=e.getBoundingClientRect(),t=d("scrollTop","pageYOffset"),r=d("scrollLeft","pageXOffset");return{left:n.left+r,right:n.right+r,top:n.top+t,bottom:n.bottom+t}}function g(e){return e.width||e.right-e.left}function f(e){return e.height||e.bottom-e.top}function p(){return{}}function v(e){function n(){var n=e;do n=n.nextSibling;while(n&&1!==n.nodeType);return n}if(e)return e.nextElementSibling||n()}function h(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName}function x(e){var n=t.classesCache[e];return n?n.lastIndex=0:t.classesCache[e]=n=new RegExp("(?:^|\\s)"+e+"(?:\\s|$)","g"),n}function y(e,n){var t=e.className;t.length?x(n).test(t)||(e.className+=" "+n):e.className=n}function M(e,n){e.className=e.className.replace(x(n)," ").trim()}function b(e){return e.targetTouches&&e.targetTouches.length?e.targetTouches[0]:e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e}function E(e,n){var t=b(n),r={pageX:"clientX",pageY:"clientY"};return e in r&&!(e in t)&&r[e]in t&&(e=r[e]),!t.type||t.type.indexOf("touch")<0?t[e]:t.type.indexOf("end")===-1&&t.originalEvent.touches[0][e.replace("client","page")]}function C(e){return e.parentNode===document?null:e.parentNode}function S(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName||"SELECT"===e.tagName||N(e)}function N(e){return!!e&&("false"!==e.contentEditable&&("true"===e.contentEditable||N(C(e))))}function I(e,n){return Array.prototype.indexOf.call(angular.element(n).children(),e)}function X(e,n,r){e&&(t.extra=r,e.dispatchEvent?e.dispatchEvent(n):e.fireEvent("on"+n.eventType,n))}function Y(e,n,r){return w(e)?!!e.apply(r||this,n||t):!!e}var O=document,T=O.documentElement,B=Array.isArray,w=angular.isFunction;return r.cleanEnviroment=function(){t.classesCache={},t.containersCtx={},t.containers={},t.mirror=void 0},r.shared=t,r};r.$inject=["$rootScope","$compile"],e.exports=r}])}); //# sourceMappingURL=dragular.min.js.map diff --git a/dist/dragular.min.js.map b/dist/dragular.min.js.map index 2626de36..439a97a6 100644 --- a/dist/dragular.min.js.map +++ b/dist/dragular.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["dragular.js"],"names":["root","factory","exports","module","define","amd","a","i","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","dragularDirective","dragularService","angular","directive","dragular","restrict","link","$scope","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","length","_isArray","isElement","initialContainers","document","querySelectorAll","o","copyOptions","extendOptions","tmp","extend","defaultOptions","classes","defaultClasses","eventNames","defaultEventNames","processOptionsObject","boundingBox","sanitizeContainers","containersFilteredModel","forEach","len","getContainers","shLen","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","cloneNode","$emit","dragularcloned","containerIndex","indexOf","domIndexOf","dragulardrag","manualStart","rect","getBoundingClientRect","width","height","getRectWidth","getRectHeight","mirrorContainer","appendChild","body","unselectable","scrollContainer","drop","ungrab","moved","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","compileItemOnDrop","element","$applyAsync","content","dragulardrop","dropIndex","splice","dropElmModel","dontCopyModel","dragularremove","removeMirrorImage","dragularout","dragulardragend","destroy","removeContainers","all","changes","makeArray","index","before","scrollTop","deltaY","stopPropagation","depSanitize","getBool","dragularover","never","getEmptyObject","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"],"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,SAASP,EAAQD,EAASQ,GAG/B,YACA,IAAIS,GAAoBT,EAAqB,GACzCU,EAAkBV,EAAqB,EAM3CP,GAAOD,QAAU,iBAEjBmB,QACElB,OAAQ,qBACRF,QAAS,kBAAmBmB,GAC5BE,UAAW,WAAYH,IAKpB,SAAShB,EAAQD,GAEtB,YAOA,IAAIqB,GAAW,SA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B,UAAfA,EAAGsG,SAAsC,aAAftG,EAAGsG,SAAyC,WAAftG,EAAGsG,SAAwBC,EAAYvG,GAGtG,QAASuG,GAAYvG,GACpB,QAAMA,IAGsB,UAAvBA,EAAGwG,kBAGoB,SAAvBxG,EAAGwG,iBAGDD,EAAYjM,EAAW0F,MAG/B,QAASzD,GAAYkK,EAAOlM,GAC3B,MAAO8J,OAAMC,UAAUhI,QAAQtK,KAAMM,QAAQgP,QAAS/G,GAAS0F,WAAYwG,GAG5E,QAASnI,GAAW7J,EAAQvB,EAAGwT,GACxBjS,IAGNX,EAAO4S,MAAQA,EACVjS,EAAOkS,cACXlS,EAAOkS,cAAezT,GAEtBuB,EAAO6J,UAAW,KAAOpL,EAAE4F,UAAW5F,IAIxC,QAAS2P,GAAS+D,EAAMC,EAAM3N,GAC7B,MAAKoG,GAAasH,KACRA,EAAKE,MAAO5N,GAAWzH,KAAMoV,GAAQ/S,KAErC8S,EA7yCX,GAAIlO,GAAOhC,SACV0B,EAAUM,EAAKqO,gBACfxQ,EAAW8N,MAAM2C,QACjB1H,EAAchN,QAAQ2U,UAYvB,OATAhR,GAAQiR,gBAAkB,WACzBpT,EAAOC,gBACPD,EAAOE,iBACPF,EAAOG,cACPH,EAAOI,OAAS4L,QAGjB7J,EAAQnC,OAASA,EAEVmC,EAoyCR5D,GAAgBwB,SAAY,aAAc,YAE1CzC,EAAOD,QAAUkB","file":"dragular.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 */\n\t'use strict';\n\tvar dragularDirective = __webpack_require__( 1 );\n\tvar dragularService = __webpack_require__( 2 );\n\n\t/**\n\t * Dragular 4.4.2 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/* 1 */\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/* 2 */\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\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: getEmptyObject, // 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\t\t\t\tif ( !_isArray( o.nameSpace ) ) {\n\t\t\t\t\to.nameSpace = [ o.nameSpace ];\n\t\t\t\t}\n\t\t\t\to.nameSpace.forEach( function eachNameSpace( nameSpace ) {\n\t\t\t\t\tif ( !shared.containers[ nameSpace ] ) {\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\t\t\t\t\tvar len = getContainers( o ).length,\n\t\t\t\t\t\tshLen = shared.containers[ nameSpace ].length;\n\t\t\t\t\tfor ( var i = 0; i < len; i++ ) {\n\t\t\t\t\t\tshared.containers[ nameSpace ][ i + shLen ] = getContainers( o )[ i ];\n\t\t\t\t\t\tshared.containersCtx[ nameSpace ][ i + shLen ] = {\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\tconsole.log( 'usecase?' );\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\tshared.item = context.item.cloneNode( true );\n\t\t\t\t\tshared.copy = true;\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\to.scope.$emit( o.eventNames[ 'dragular' + type ], shared.item, shared.lastDropTarget, shared.source, e );\n\t\t\t\t\t}\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}\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\t\t\t\tshared.targetCtx = targetCtx || {};\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.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\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\tif ( isInitialPlacement( target ) ) {\n\t\t\t\t\t\t\to.scope.$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\to.scope.$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\n\t\t\t\t\tif ( !o.compileItemOnDrop ) {\n\t\t\t\t\t\tcleanup();\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 getEmptyObject() {\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/******/ ])\n});\n;"]} \ No newline at end of file +{"version":3,"sources":["dragular.js"],"names":["root","factory","exports","module","define","amd","a","i","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","dragularDirective","dragularService","angular","directive","dragular","restrict","link","$scope","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","length","_isArray","isElement","initialContainers","document","querySelectorAll","o","copyOptions","extendOptions","tmp","extend","defaultOptions","classes","defaultClasses","eventNames","defaultEventNames","processOptionsObject","boundingBox","sanitizeContainers","containersFilteredModel","forEach","len","getContainers","shLen","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","cloneNode","$emit","dragularcloned","containerIndex","indexOf","domIndexOf","dragulardrag","manualStart","rect","getBoundingClientRect","width","height","getRectWidth","getRectHeight","mirrorContainer","appendChild","body","unselectable","scrollContainer","drop","ungrab","moved","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","compileItemOnDrop","element","$applyAsync","content","dragulardrop","dropIndex","splice","dropElmModel","dontCopyModel","dragularremove","removeMirrorImage","dragularout","dragulardragend","destroy","removeContainers","all","changes","makeArray","index","before","scrollTop","deltaY","stopPropagation","depSanitize","getBool","dragularover","never","getEmptyObject","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"],"mappings":"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EACVjS,EAAOkS,cACXlS,EAAOkS,cAAezT,GAEtBuB,EAAO6J,UAAW,KAAOpL,EAAE4F,UAAW5F,IAIxC,QAAS2P,GAAS+D,EAAMC,EAAM3N,GAC7B,MAAKoG,GAAasH,KACRA,EAAKE,MAAO5N,GAAWzH,KAAMoV,GAAQ/S,KAErC8S,EApzCX,GAAIlO,GAAOhC,SACV0B,EAAUM,EAAKqO,gBACfxQ,EAAW8N,MAAM2C,QACjB1H,EAAchN,QAAQ2U,UAYvB,OATAhR,GAAQiR,gBAAkB,WACzBpT,EAAOC,gBACPD,EAAOE,iBACPF,EAAOG,cACPH,EAAOI,OAAS4L,QAGjB7J,EAAQnC,OAASA,EAEVmC,EA2yCR5D,GAAgBwB,SAAY,aAAc,YAE1CzC,EAAOD,QAAUkB","file":"dragular.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 */\n\t'use strict';\n\tvar dragularDirective = __webpack_require__( 1 );\n\tvar dragularService = __webpack_require__( 2 );\n\n\t/**\n\t * Dragular 4.4.2 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/* 1 */\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/* 2 */\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\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: getEmptyObject, // 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\t\t\t\tif ( !_isArray( o.nameSpace ) ) {\n\t\t\t\t\to.nameSpace = [ o.nameSpace ];\n\t\t\t\t}\n\t\t\t\to.nameSpace.forEach( function eachNameSpace( nameSpace ) {\n\t\t\t\t\tif ( !shared.containers[ nameSpace ] ) {\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\t\t\t\t\tvar len = getContainers( o ).length,\n\t\t\t\t\t\tshLen = shared.containers[ nameSpace ].length;\n\t\t\t\t\tfor ( var i = 0; i < len; i++ ) {\n\t\t\t\t\t\tshared.containers[ nameSpace ][ i + shLen ] = getContainers( o )[ i ];\n\t\t\t\t\t\tshared.containersCtx[ nameSpace ][ i + shLen ] = {\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\tconsole.log( 'usecase?' );\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\tshared.item = context.item.cloneNode( true );\n\t\t\t\t\tshared.copy = true;\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\to.scope.$emit( o.eventNames[ 'dragular' + type ], shared.item, shared.lastDropTarget, shared.source, e );\n\t\t\t\t\t}\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}\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\tif ( 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.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\tconsole.log('release');\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\tif ( isInitialPlacement( target ) ) {\n\t\t\t\t\t\t\to.scope.$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\to.scope.$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\n\t\t\t\t\tif ( !o.compileItemOnDrop ) {\n\t\t\t\t\t\tcleanup();\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 getEmptyObject() {\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/******/ ])\n});\n;"]} \ No newline at end of file diff --git a/docs/dist/examples.js b/docs/dist/examples.js index 2c603b8f..2fe728c8 100644 --- a/docs/dist/examples.js +++ b/docs/dist/examples.js @@ -950,7 +950,12 @@ return /******/ (function(modules) { // webpackBootstrap while ( target && !accepted() ) { target = getParent( target ); } - shared.targetCtx = targetCtx || {}; + + // bugfix #148 model not updated on spill + if ( targetCtx ){ + shared.targetCtx = targetCtx; + } + return target; function accepted() { @@ -1164,6 +1169,8 @@ return /******/ (function(modules) { // webpackBootstrap function release( e ) { + + console.log('release'); ungrab(); if ( !drake.dragging ) { return; @@ -2695,8 +2702,8 @@ return /******/ (function(modules) { // webpackBootstrap /***/ function(module, exports) { 'use strict'; module.exports = angular.module("templates", []).run(["$templateCache", function($templateCache) {$templateCache.put("docsInstall/docsInstall.html","

Install

\n

download dragular.js and dragular.css from dist folder

\n

OR clone git

\n
\ngit clone http://github.com/luckylooke/dragular.git\n
\n

OR use npm

\n
\n[sudo] npm install dragular\n
\n

OR use bower

\n
\nbower install dragular\n
\n

AND 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
\n

AND put dragularModule into dependency array

\n
\nvar app = angular.module(\'myApp\', [\'dragularModule\', \'otherDependencies\']);\n
\n

DONE :)

\n"); - $templateCache.put("exampleBasic/exampleBasic.html","
\n

Basic

\n \n
\n
\n
Move me, but you can only drop me in one of these containers.
\n
If you try to drop me somewhere other than these containers, I\'ll just come back.
\n
Item 3.
\n
Item 6.
\n
\n
\n
You can drop me in the left container, otherwise I\'ll stay here.
\n
Try to click me, dragular distinguish drag from click
\n
Item 5.
\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      
\n
\n"); $templateCache.put("exampleBasicWithModel/exampleBasicWithModel.html","
\n

Basic - with model

\n \n
\n
\n
\n
{{item.content}}
\n
\n
\n
{{item.content}}
\n
\n
\n
\n
\n
Items1:\n          
{{items1 | json}}
\n
\n
\n
Items2:\n          
{{items2 | json}}
\n
\n
\n
\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"); + $templateCache.put("exampleBasic/exampleBasic.html","
\n

Basic

\n \n
\n
\n
Move me, but you can only drop me in one of these containers.
\n
If you try to drop me somewhere other than these containers, I\'ll just come back.
\n
Item 3.
\n
Item 6.
\n
\n
\n
You can drop me in the left container, otherwise I\'ll stay here.
\n
Try to click me, dragular distinguish drag from click
\n
Item 5.
\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      
\n
\n"); $templateCache.put("exampleBoundingBox/exampleBoundingBox.html","
\n

BoundingBox

\n \n
\n
\n
This items cannot cross its example element, just try it your selves.
\n
Item 2.
\n
Item 3.
\n
Item 6.
\n
\n
\n
This items cannot cross its example element, just try it your selves.
\n
Item 4.
\n
Item 5.
\n
\n
\n
\n        \n  dragularService([$element.children(), {\n    boundingBox: $element\n  });\n        \n      
\n
"); $templateCache.put("exampleBoundingBoxLockX/exampleBoundingBoxLockX.html","
\n

BoundingBox and lockX

\n \n
\n
\n
\n
Items are locked in X axis movement and cannot cross its closest parent div.boundingBox, just try it your selves.
\n
item 2
\n
item 3
\n
item 4
\n
\n
\n
\n
\n        \n  dragularService([$element.children()[0].children(), {\n    boundingBox: $element.children()[0],\n    lockX: true\n  });\n        \n      
\n
"); $templateCache.put("exampleBoundingBoxLockY/exampleBoundingBoxLockY.html","
\n

BoundingBox and LockY

\n \n
\n
\n
\n
Items are locked in Y axis movement and cannot cross its closest parent div.boundingBox, just try it your selves.
\n
item 2
\n
item 3
\n
item 4
\n
item 5
\n
item 6
\n
\n
\n
\n
\n        \n  dragularService([$element.children()[0].children(), {\n    boundingBox: $element.children()[0],\n    lockY: true\n  });\n        \n      
\n
"); @@ -2723,7 +2730,7 @@ return /******/ (function(modules) { // webpackBootstrap $templateCache.put("partials/partial-contribute.html","
\n
\n
\n \n
\n
\n
\n"); $templateCache.put("partials/partial-docs.html","
\n
\n
\n \n
\n \n
\n

\n \n

\n \n
\n
\n \n
\n \n
\n"); $templateCache.put("partials/partial-home.html","
\n
\n \n
\n
\n

DRAGULAR

\n

Angular drag&drop based on dragula.

\n

Live examples in docs

\n
\n
\n
\n

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

\n

Inspiration

\n

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

\n

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

\n

Differences of dragular (against dragula)

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

Todo

\n
    \n
  • improve docs
  • \n
\n

Features

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

For installation, usage and examples go to docs

\n
\n
\n \n
\n \n
\n \n
\n"); - $templateCache.put("partials/autogenerated/contribute.html","

How to contribute

\n

It'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.

\n

Before contributing, please read the code of conduct.

\n

Reporting issues

\n

GitHub 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:

\n

1. 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.

\n

2. Not sure if it's a bug?. Then please ask via issues and tag it [question].

\n

3. 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.

\n

4. Include a live example. After narrowing your code down to only the problem areas, make use of jsFiddle, 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 fiddle)

\n

5. 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.

\n

Dev vs. Master

\n

The 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.

\n

Making Changes

\n

To take advantage of our npm build script and jshint config it will be easiest for you if you have node.js installed locally.

\n

You can download node.js from nodejs.org.

\n

After 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.

\n

Developing

\n

There are several gulp tasks that are used for generating different builds:

\n
    \n
  • gulp dev - Serves files with BrowserSync server, watches & automatically refreshes connected browsers on changes, generates non-minified but concatenated styles & scripts from the dragular source.
  • \n
  • gulp dev:docs - Does exactly the same as gulp dev, except it works with the documentation source.
  • \n
  • gulp build - Concatenates and minifies dragular source files.
  • \n
  • gulp build:docs - Concatenates and minifies documentation source files.
  • \n
\n

Linting

\n
    \n
  • gulp lint & gulp lint:docs - Lint JavaScript files.
  • \n
\n

Making a pull request

\n

Once that is ready, make your changes and submit a Pull Request:

\n
    \n
  • Send 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.

    \n
  • \n
  • Ensure changes are jshint validated. Our JSHint configuration file is provided in the repository and you should check against it before submitting.

    \n
  • \n
  • Only 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.

    \n
  • \n
\n

Dependencies for building from source and running tests:

\n

Coding style preferences are not contributions

\n

If 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.

\n

I don't really like git / node.js, but I can fix this bug

\n

That 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");}]); + $templateCache.put("partials/autogenerated/contribute.html","

How to contribute

\n

It'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.

\n

Before contributing, please read the code of conduct.

\n

Reporting issues

\n

GitHub 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:

\n

1. 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.

\n

2. Not sure if it's a bug?. Then please ask via issues and tag it [question].

\n

3. 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.

\n

4. 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)

\n

5. 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.

\n

Dev vs. Master

\n

The 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.

\n

Making Changes

\n

To take advantage of our npm build script and jshint config it will be easiest for you if you have node.js installed locally.

\n

You can download node.js from nodejs.org.

\n

After 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.

\n

Developing

\n

There are several gulp tasks that are used for generating different builds:

\n
    \n
  • gulp dev - Serves files with BrowserSync server, watches & automatically refreshes connected browsers on changes, generates non-minified but concatenated styles & scripts from the dragular source.
  • \n
  • gulp dev:docs - Does exactly the same as gulp dev, except it works with the documentation source.
  • \n
  • gulp build - Concatenates and minifies dragular source files.
  • \n
  • gulp build:docs - Concatenates and minifies documentation source files.
  • \n
\n

Linting

\n
    \n
  • gulp lint & gulp lint:docs - Lint JavaScript files.
  • \n
\n

Making a pull request

\n

Once that is ready, make your changes and submit a Pull Request:

\n
    \n
  • Send 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.

    \n
  • \n
  • Ensure changes are jshint validated. Our JSHint configuration file is provided in the repository and you should check against it before submitting.

    \n
  • \n
  • Only 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.

    \n
  • \n
\n

Dependencies for building from source and running tests:

\n

Coding style preferences are not contributions

\n

If 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.

\n

I don't really like git / node.js, but I can fix this bug

\n

That 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");}]); /***/ } /******/ ]) diff --git a/docs/dist/examples.min.js b/docs/dist/examples.min.js index 7a2368a9..9b3757a4 100644 --- a/docs/dist/examples.min.js +++ b/docs/dist/examples.min.js @@ -1,5 +1,5 @@ -!function(e,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var t=n();for(var o in t)("object"==typeof exports?exports:e)[o]=t[o]}}(this,function(){return function(e){function n(o){if(t[o])return t[o].exports;var i=t[o]={exports:{},id:o,loaded:!1};return e[o].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}var t={};return n.m=e,n.c=t,n.p="",n(0)}([function(e,n,t){"use strict";var o=t(1),i=t(4),r=t(5),l=t(6),a=t(7),c=t(8),s=t(9),d=t(10),m=t(11),u=t(12),v=t(13),p=t(14),g=t(15),h=t(16),f=t(17),b=t(18),y=t(19),x=t(20),I=t(21),w=t(22),S=t(23),M=t(24),$=t(25),q=t(26),C=t(27),B=t(28),k=t(29);t(30),angular.module("examplesApp",[o,"templates","ui.router"]).config(i).controller("Basic",r).controller("BasicModel",l).controller("BoundingBox",a).controller("BoundingBoxLockX",c).controller("BoundingBoxLockY",s).controller("Copy",d).controller("CopyModel",m).controller("CustomClasses",u).controller("DifferentOptionsModel",v).controller("Directive",p).controller("DirectiveModel",g).controller("DragOverEvents",h).controller("Events",f).controller("Handle",b).controller("IsContainerModel",y).controller("NameSpaces",x).controller("NestedNgRepeat",I).controller("NestedNgRepeatWithModel",w).controller("NgRepeat",S).controller("NgRepeatFilteredWithModel",M).controller("NgRepeatWithModel",$).controller("RemoveOnSpill",q).controller("RemoveOnSpillWithModel",C).controller("RevertOnSpill",B).controller("ScrollingDrag",k).controller("ExAppCtrl",["$scope",function(e){e.examplesList=[{template:"docsInstall/docsInstall.html",link:"docsInstall",title:"Installation"},{template:"exampleBasic/exampleBasic.html",link:"exampleBasic",title:"Basic"},{template:"exampleBasicWithModel/exampleBasicWithModel.html",link:"exampleBasicWithModel",title:"Basic - with model"},{template:"exampleDifferentOptionsWithModel/exampleDifferentOptionsWithModel.html",link:"exampleDifferentOptionsWithModel",title:"Different options - with model"},{template:"exampleDirective/exampleDirective.html",link:"exampleDirective",title:"Directive"},{template:"exampleDirectiveWithModel/exampleDirectiveWithModel.html",link:"exampleDirectiveWithModel",title:"Directive - with model"},{template:"exampleEvents/exampleEvents.html",link:"exampleEvents",title:"Events"},{template:"exampleRemoveOnSpill/exampleRemoveOnSpill.html",link:"exampleRemoveOnSpill",title:"Remove on spill"},{template:"exampleRemoveOnSpillWithModel/exampleRemoveOnSpillWithModel.html",link:"exampleRemoveOnSpillWithModel",title:"Remove on spill - with model"},{template:"exampleRevertOnSpill/exampleRevertOnSpill.html",link:"exampleRevertOnSpill",title:"Revert on spill"},{template:"exampleCopy/exampleCopy.html",link:"exampleCopy",title:"Copy"},{template:"exampleCopyWithModel/exampleCopyWithModel.html",link:"exampleCopyWithModel",title:"Copy - with model"},{template:"exampleHandle/exampleHandle.html",link:"exampleHandle",title:"Handle"},{template:"exampleIsContainerWithModel/exampleIsContainerWithModel.html",link:"exampleIsContainerWithModel",title:"isContainer - with model"},{template:"exampleCustomClasses/exampleCustomClasses.html",link:"exampleCustomClasses",title:"Custom classes"},{template:"exampleNameSpaces/exampleNameSpaces.html",link:"exampleNameSpaces",title:"NameSpaces"},{template:"exampleDragOverEvents/exampleDragOverEvents.html",link:"exampleDragOverEvents",title:"Drag-over events"},{template:"exampleBoundingBox/exampleBoundingBox.html",link:"exampleBoundingBox",title:"BoundingBox"},{template:"exampleBoundingBoxLockX/exampleBoundingBoxLockX.html",link:"exampleBoundingBoxLockX",title:"BoundingBox + LockX"},{template:"exampleBoundingBoxLockY/exampleBoundingBoxLockY.html",link:"exampleBoundingBoxLockY",title:"BoundingBox + LockY"},{template:"exampleNgRepeat/exampleNgRepeat.html",link:"exampleNgRepeat",title:"ngRepeat"},{template:"exampleNgRepeatWithModel/exampleNgRepeatWithModel.html",link:"exampleNgRepeatWithModel",title:"ngRepeat - with model"},{template:"exampleNgRepeatFilteredWithModel/exampleNgRepeatFilteredWithModel.html",link:"exampleNgRepeatFilteredWithModel",title:"Filtered ngRepeat - with model"},{template:"exampleNestedNgRepeat/exampleNestedNgRepeat.html",link:"exampleNestedNgRepeat",title:"Nested ngRepead"},{template:"exampleNestedNgRepeatWithModel/exampleNestedNgRepeatWithModel.html",link:"exampleNestedNgRepeatWithModel",title:"Nested ngRepead - with model"},{template:"exampleScrollingDrag/exampleScrollingDrag.html",link:"exampleScrollingDrag",title:"Scrolling drag"}],e.highlightCode=function(){if(document.getElementsByTagName("code").length)for(var e=document.getElementsByTagName("code"),n=e.length-1;n>=0;n--)hljs.highlightBlock(e[n])};var n;e.toggleSidebar=function(){n||(n=angular.element(document.getElementById("rowOffcanvas"))),n.toggleClass("active")}}])},function(e,n,t){"use strict";var o=t(2),i=t(3);e.exports="dragularModule",angular.module("dragularModule",[]).factory("dragularService",i).directive("dragular",o)},function(e,n){"use strict";var t=function(e){return{restrict:"A",link:function(n,t,o){function i(e){try{return JSON.parse(e)}catch(n){return}}var r=n.$eval(o.dragular)||i(o.dragular)||{};o.dragularModel&&(r.containersModel=o.dragularModel,r.scope||(r.scope=n)),o.dragularNameSpace&&(r.nameSpace=o.dragularNameSpace.split(" ")),o.dragularOnInit&&(r.onInit=n.$eval(o.dragularOnInit)),e(t[0],r)}}};t.$inject=["dragularService"],e.exports=t},function(e,n){"use strict";var t={classesCache:{},containersCtx:{},containers:{},mirror:null,source:null,item:null,copy:null,sourceItem:null,sourceModel:null,sourceFilteredModel:null,target:null,targetCtx:null,targetModel:null,lastDropTarget:null,offsetX:null,offsetY:null,moveX:null,moveY:null,offsetXr:null,offsetYb:null,clientX:null,clientY:null,mirrorWidth:null,mirrorHeight:null,initialSibling:null,currentSibling:null,initialIndex:null,currentIndex:null,tempModel:null,dragOverEvents:{},lastElementBehindCursor:null,grabbed:null},o=function(e,n){function o(o,m){function b(){1!==arguments.length||R(o)||angular.isElement(o)||o[0]||"string"==typeof o?"string"==typeof o&&(ve=document.querySelectorAll(o)):(pe=o||{},ve=[]),ue=pe.copyOptions?angular.copy(pe):pe}function I(){var e=angular.extend({},be,ue);angular.extend(ue,e),ue.classes&&(e=angular.extend({},he,ue.classes),angular.extend(ue.classes,e)),ue.eventNames&&(e=angular.extend({},fe,ue.eventNames),angular.extend(ue.eventNames,e))}function $(){f(ue.boundingBox)||(ue.boundingBox=!1),ue.containers&&(ve=ue.containers),ue.containers=i(ve,!1,ue.scope),ue.containersModel=i(ue.containersModel,!0,ue.scope),R(ue.containersFilteredModel)?ue.containersFilteredModel=R(ue.containersFilteredModel[0])?ue.containersFilteredModel:[ue.containersFilteredModel]:ue.containersFilteredModel=[],ue.nameSpace||(ue.nameSpace=["dragularCommon"]),R(ue.nameSpace)||(ue.nameSpace=[ue.nameSpace]),ue.nameSpace.forEach(function(e){t.containers[e]||(t.containers[e]=[],t.containersCtx[e]=[]);for(var n=Z(ue).length,o=t.containers[e].length,i=0;ir.left+t.offsetX&&or.top+t.offsetY&&it)return i;if(!a&&r.top>o)return i}return null}function r(){var e=n.getBoundingClientRect();return l(a?t>e.left+v(e)/2:o>e.top+p(e)/2)}function l(e){return e?h(n):n}var a="horizontal"===ue.direction;return n!==e?r():i()}function _(e,n,t){var o,i=e||{},r=i.className;return i.className+=" "+ue.classes.hide,o=k.elementFromPoint(n,t),i.className=r,o}function K(e){if(!e)return!1;for(var n=ue.nameSpace.length;n--;)if(t.containers[ue.nameSpace[n]].indexOf(e)!==-1)return!0;return ue.isContainer(e)?(t.tempModel=ue.isContainerModel(e),!0):(t.tempModel=null,!1)}function Z(e){return ne("containers",e)}function ee(e){return ne("containersModel",e,!0)}function ne(e,n,o){return N(n[e])?i(n[e](n===ue?ye:null,t),o,n.scope):n[e]}function te(e){if(ye.dragging){var n=arguments.length>0?e:ge(ue.revertOnSpill),o=S(t.item),i=z(o);i||t.copy||!n||t.source.insertBefore(t.item,t.initialSibling),!t.sourceModel||t.copy||n?ue.scope&&(i||n)&&ue.scope.$emit(ue.eventNames.dragularcancel,t.item,t.source,t.sourceModel,t.initialIndex):ie(t.item,o),(!t.sourceModel||t.copy||n||i)&&le()}}function oe(e){if(F(),ye.dragging){e.originalEvent&&(e=e.originalEvent),t.clientX=w("clientX",e),t.clientY=w("clientY",e);var n=_(t.mirror,t.clientX,t.clientY),o=P(n,t.clientX,t.clientY);o&&(t.copy&&ge(ue.copySortSource)||!t.copy||o!==t.source)?ie(t.item,o):ge(ue.removeOnSpill)?re():te(),t.target=null,t.lastElementBehindCursor&&C(t.lastElementBehindCursor,t.dragOverEvents.dragularrelease,n),ue.scope&&ue.scope.$emit(ue.eventNames.dragularrelease,t.item,t.source,e)}}function ie(o,i){function l(){if(Z(ue).forEach(function(e){r(e,"off","mousedown",j),r(e,"on","mousedown",j)}),ue.compileItemOnDrop){var e=angular.element(i).scope?angular.element(i).scope():ue.scope;e&&e.$applyAsync(function(){var r=n(t.copy?a.cloneNode(!0):a)(e);o.parentNode===i&&i.removeChild(o),i.insertBefore(r[0],c),le()})}ue.scope&&(z(i)?ue.scope.$emit(ue.eventNames.dragularcancel,o,t.source,t.sourceModel,t.initialIndex):ue.scope.$emit(ue.eventNames.dragulardrop,o,i,t.source,t.sourceModel,t.initialIndex,t.targetModel,s)),ue.compileItemOnDrop||le()}if(!o)return void le();var a=t.sourceItem,c=t.currentSibling,s=q(o,i);t.copy&&i===t.source&&S(o)&&ge(ue.copySortSource)&&o.parentNode.removeChild(t.sourceItem),t.sourceModel&&!z(i)?(t.targetCtx&&t.targetCtx.fm&&(s=t.targetCtx.m.indexOf(t.targetCtx.fm[s])),t.sourceFilteredModel&&(t.initialIndex=t.sourceModel.indexOf(t.sourceFilteredModel[t.initialIndex])),e.$applyAsync(function(){t.sourceModel&&(i===t.source?t.sourceModel.splice(s,0,t.sourceModel.splice(t.initialIndex,1)[0]):(t.dropElmModel=t.copy&&!ue.dontCopyModel?angular.copy(t.sourceModel[t.initialIndex]):t.sourceModel[t.initialIndex],t.tempModel?t.targetModel=t.tempModel:t.targetModel=t.targetCtx&&t.targetCtx.m||t.sourceModel,o.parentNode.removeChild(o),t.copy||t.sourceModel.splice(t.initialIndex,1),t.targetModel&&t.targetModel.splice(s,0,t.dropElmModel)),S(o)&&o.parentNode.removeChild(o),l())})):l()}function re(){if(ye.dragging){var n=S(t.item);n&&n.removeChild(t.item),t.sourceModel&&e.$applyAsync(function(){t.sourceModel.splice(t.initialIndex,1),le()}),ue.scope&&ue.scope.$emit(t.copy?ue.eventNames.dragularcancel:ue.eventNames.dragularremove,t.item,n,t.sourceModel,t.initialIndex),t.sourceModel||le()}}function le(){F(),de(),t.item&&x(t.item,ue.classes.transit),ye.dragging=!1,ge(ue.removeOnSpill)===!0&&U(),ue.scope&&(t.lastDropTarget&&ue.scope.$emit(ue.eventNames.dragularout,t.item,t.lastDropTarget,t.source),ue.scope.$emit(ue.eventNames.dragulardragend,t.item)),t.source=t.item=t.sourceItem=t.initialSibling=t.currentSibling=t.sourceModel=null,t.initialIndex=t.currentIndex=t.lastDropTarget=t.tempModel=t.targetModel=null,t.dropElmModel=t.targetCtx=t.copy=t.moveX=t.moveY=null}function ae(){O(!0),ce(ue.containers),oe({})}function ce(n){e.$applyAsync(function(){var e=R(n)?n:c(n);e.forEach(function(e){angular.forEach(ue.nameSpace,function(n){var o;o=t.containers[n].indexOf(e),t.containers[n].splice(o,1),t.containersCtx[n].splice(o,1)})})})}function se(e){if(t.target){e.originalEvent&&(e=e.originalEvent);var n=t.target.scrollTop;t.target.scrollTop+=e.deltaY,n!==t.target.scrollTop&&(e.stopPropagation(),e.preventDefault())}}function de(){t.mirror&&(x(k.body,ue.classes.unselectable),r(E,"off","mousemove",H),r(t.mirror,"off","wheel",se),S(t.mirror)&&t.mirror.parentNode.removeChild(t.mirror),t.mirror=null)}function me(e){i(e,!0,ue.scope)}var ue,ve=o||[],pe=m||{},ge=B,he={mirror:"gu-mirror",hide:"gu-hide",unselectable:"gu-unselectable",transit:"gu-transit"},fe={dragularenter:"dragularenter",dragularleave:"dragularleave",dragularrelease:"dragularrelease",dragularcloned:"dragularcloned",dragulardrag:"dragulardrag",dragularcancel:"dragularcancel",dragulardrop:"dragulardrop",dragularremove:"dragularremove",dragulardragend:"dragulardragend",dragularshadow:"dragularshadow",dragularover:"dragularover",dragularout:"dragularout"},be={copyOptions:!1,classes:he,eventNames:fe,containers:!1,containersModel:!1,containersFilteredModel:!1,isContainer:l,isContainerModel:g,isContainerAccepts:a,moves:a,accepts:a,canBeAccepted:a,copy:!1,copySortSource:!1,dontCopyModel:!1,invalid:l,revertOnSpill:!1,removeOnSpill:!1,lockX:!1,lockY:!1,boundingBox:!1,mirrorContainer:k.body,ignoreInputTextSelection:!0,compileItemOnDrop:!1,onInit:!1},ye={containers:t.containers,containersCtx:t.containersCtx,sanitizeContainersModel:me,sanitizeContainers:i,isContainer:K,start:W,end:A,cancel:te,remove:re,destroy:ae,dragging:!1};return b(),I(),$(),O(),ue.onInit&&ue.onInit(ye,ue),ye}function i(e,n,t){if(N(e))return e;if(R(e))return n?R(e[0])?e:[e]:e;if("string"==typeof e&&t){var o=t.$eval(e);return N(o)?o:function(){return t.$eval(e)}}return e?c(e):[]}function r(e,n,t,o){var i={mouseup:"touchend",mousedown:"touchstart",mousemove:"touchmove"},r={mouseup:"pointerup",mousedown:"pointerdown",mousemove:"pointermove"},l={mouseup:"MSPointerUp",mousedown:"MSPointerDown",mousemove:"MSPointerMove"},a=angular.element(e);if(e.addEventListener){var c={on:"addEventListener",off:"removeEventListener"};e[c[n]](t,o,{passive:!1}),e[c[n]](i[t],o,{passive:!1})}else"undefined"!=typeof navigator&&navigator.pointerEnabled&&r[t]?a[n](r[t],o):"undefined"!=typeof navigator&&navigator.msPointerEnabled&&l[t]?a[n](l[t],o):i[t]&&a[n](i[t],o),a[n](t,o)}function l(){return!1}function a(){return!0}function c(e,n){return R(e)?e:e.length?Array.prototype.slice.call(e,n):[e]}function s(e){if(e.touches)return e.touches.length;if(e.originalEvent&&e.originalEvent.touches)return e.originalEvent.touches.length;if(void 0!==e.which&&0!==e.which)return e.which;if(void 0!==e.buttons)return e.buttons;var n=e.button;return void 0!==n?1&n?1:2&n?3:4&n?2:0:void 0}function d(e){e.originalEvent&&(e=e.originalEvent),t.grabbed&&e.preventDefault()}function m(e,n){return"undefined"!=typeof window[n]?window[n]:E.clientHeight?E[e]:k.body[e]}function u(e){var n=e.getBoundingClientRect(),t=m("scrollTop","pageYOffset"),o=m("scrollLeft","pageXOffset");return{left:n.left+o,right:n.right+o,top:n.top+t,bottom:n.bottom+t}}function v(e){return e.width||e.right-e.left}function p(e){return e.height||e.bottom-e.top}function g(){return{}}function h(e){function n(){var n=e;do n=n.nextSibling;while(n&&1!==n.nodeType);return n}if(e)return e.nextElementSibling||n()}function f(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName}function b(e){var n=t.classesCache[e];return n?n.lastIndex=0:t.classesCache[e]=n=new RegExp("(?:^|\\s)"+e+"(?:\\s|$)","g"),n}function y(e,n){var t=e.className;t.length?b(n).test(t)||(e.className+=" "+n):e.className=n}function x(e,n){e.className=e.className.replace(b(n)," ").trim()}function I(e){return e.targetTouches&&e.targetTouches.length?e.targetTouches[0]:e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e}function w(e,n){var t=I(n),o={pageX:"clientX",pageY:"clientY"};return e in o&&!(e in t)&&o[e]in t&&(e=o[e]),!t.type||t.type.indexOf("touch")<0?t[e]:t.type.indexOf("end")===-1&&t.originalEvent.touches[0][e.replace("client","page")]}function S(e){return e.parentNode===document?null:e.parentNode}function M(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName||"SELECT"===e.tagName||$(e)}function $(e){return!!e&&("false"!==e.contentEditable&&("true"===e.contentEditable||$(S(e))))}function q(e,n){return Array.prototype.indexOf.call(angular.element(n).children(),e)}function C(e,n,o){e&&(t.extra=o,e.dispatchEvent?e.dispatchEvent(n):e.fireEvent("on"+n.eventType,n))}function B(e,n,o){return N(e)?!!e.apply(o||this,n||t):!!e}var k=document,E=k.documentElement,R=Array.isArray,N=angular.isFunction;return o.cleanEnviroment=function(){t.classesCache={},t.containersCtx={},t.containers={},t.mirror=void 0},o.shared=t,o};o.$inject=["$rootScope","$compile"],e.exports=o},function(e,n){"use strict";var t=function(e,n){n.otherwise("/home");var t,o=function(e,n,o){n.link?o.cancel(t):t=o(function(){e.go("docs.detail",{link:"docsInstall"})},0)};o.$inject=["$state","$stateParams","$timeout"],e.state("home",{url:"/home",templateUrl:"partials/partial-home.html"}).state("docs",{url:"/docs",templateUrl:"partials/partial-docs.html",controller:o}).state("docs.detail",{url:"/:link",templateUrl:function(e){return e.link+"/"+e.link+".html"},controller:o}).state("contribute",{url:"/contribute",templateUrl:"partials/partial-contribute.html"})};t.$inject=["$stateProvider","$urlRouterProvider"],e.exports=t},function(e,n){"use strict";var t=function(e,n){n.cleanEnviroment(),n(".containerVertical")};t.$inject=["$element","dragularService"],e.exports=t},function(e,n){"use strict";var t=function(e,n,t){e.items1=[{content:"Move me, but you can only drop me in one of these containers."},{content:"If you try to drop me somewhere other than these containers, I'll just come back."},{content:"Item 3"},{content:"Item 4"}],e.items2=[{content:"Item 5"},{content:"Item 6"},{content:"Item 7"},{content:"Item 8"}];var o=n.children().eq(0).children();t.cleanEnviroment(),t([o[0],o[1]],{containersModel:[e.items1,e.items2]})};t.$inject=["$scope","$element","dragularService"],e.exports=t},function(e,n){"use strict";var t=function(e,n){var t=e[0];n.cleanEnviroment(),n(e.children(),{boundingBox:t})};t.$inject=["$element","dragularService"],e.exports=t},function(e,n){"use strict";var t=function(e,n){var t=e.children().children()[0];n.cleanEnviroment(),n(t,{boundingBox:t,lockX:!0})};t.$inject=["$element","dragularService"],e.exports=t},function(e,n){"use strict";var t=function(e,n){var t=e.children().children()[0];n.cleanEnviroment(),n(t,{boundingBox:t,lockY:!0})};t.$inject=["$element","dragularService"],e.exports=t},function(e,n){"use strict";var t=function(e,n){n.cleanEnviroment(),n(e.children(),{copy:!0})};t.$inject=["$element","dragularService"],e.exports=t},function(e,n){"use strict";var t=function(e,n,t){e.items1=[{content:"Move me, and make copy on drop."},{content:"If you try to drop me somewhere other than these containers, I'll just come back."},{content:"Item 3"},{content:"Item 4"}],e.items2=[{content:"Item 5"},{content:"Item 6"},{content:"Item 7"},{content:"Item 8"}];var o=n.children().eq(0).children();t.cleanEnviroment(),t([o[0],o[1]],{containersModel:[e.items1,e.items2],copy:!0})};t.$inject=["$scope","$element","dragularService"],e.exports=t},function(e,n){"use strict";var t=function(e,n){n.cleanEnviroment(),n(e.children(),{classes:{mirror:"custom-green-mirror"}})};t.$inject=["$element","dragularService"],e.exports=t},function(e,n){"use strict";var t=function(e,n,t){function o(e,n,t){if(t===i||t===n)return!0}e.items1=[{content:"Move me, but you can only drop me in one of these containers."},{content:"If you try to drop me somewhere other than these containers, I'll just come back."},{content:"Item 3"},{content:"Item 4"}],e.items2=[{content:"Item 5"},{content:"Item 6"},{content:"Item 7"},{content:"Item 8"}];var i=document.querySelector("#containerLeft"),r=document.querySelector("#containerRight");t.cleanEnviroment(),t([i],{containersModel:[e.items1],copy:!0,copySortSource:!0,accepts:o}),t([r],{containersModel:[e.items2],removeOnSpill:!0,accepts:o})};t.$inject=["$scope","$element","dragularService"],e.exports=t},function(e,n){"use strict";var t=function(e){e.dragularOptions={classes:{mirror:"custom-green-mirror"},nameSpace:"same"}};t.$inject=["$scope"],e.exports=t},function(e,n){"use strict";var t=function(e){e.items1=[{content:"Move me, and make copy on drop."},{content:"If you try to drop me somewhere other than these containers, I'll just come back."},{content:"Item 3"},{content:"Item 4"}],e.items2=[{content:"Item 5"},{content:"Item 6"},{content:"Item 7"},{content:"Item 8"}],e.dragularOptions={containersModel:e.items1,classes:{mirror:"custom-green-mirror"},nameSpace:"common"}};t.$inject=["$scope"],e.exports=t},function(e,n){"use strict";var t=function(e,n){function t(e){e.on("dragularenter",function(t){e[0]===t.target&&e.addClass(n.shared.extra?"gu-over-accept":"gu-over-decline")}),e.on("dragularleave dragularrelease",function(t){(e[0]===t.target&&n.shared.extra&&n.shared.extra.parentElement!==t.target||"dragularrelease"===t.type)&&(e.removeClass("gu-over-accept"),e.removeClass("gu-over-decline"))})}n.cleanEnviroment(),n([e.children()[0],e.children()[2]],{nameSpace:"apples"}),n([e.children()[1],e.children()[3]],{nameSpace:"oranges"}),angular.forEach(e.children(),function(e){t(angular.element(e))});var o=angular.element(document.getElementsByClassName("notContainer"));o.on("dragularenter",function(){o.addClass("gu-over")}),o.on("dragularleave dragularrelease",function(){o.removeClass("gu-over")})};t.$inject=["$element","dragularService"],e.exports=t},function(e,n){"use strict";var t=function(e,n,t,o){function i(e){return function(){}}t.cleanEnviroment();t(n.children(),{scope:e});e.$on("dragulardrag",function(e,n){e.stopPropagation(),n.className=n.className.replace(" ex-moved","")}),e.$on("dragulardrop",function(e,n){e.stopPropagation(),o(function(){n.className+=" ex-moved"},0)}),e.$on("dragularcloned",i("cloned")),e.$on("dragulardrag",i("drag")),e.$on("dragularcancel",i("cancel")),e.$on("dragulardrop",i("drop")),e.$on("dragularremove",i("remove")),e.$on("dragulardragend",i("dragend")),e.$on("dragularshadow",i("shadow"))};t.$inject=["$scope","$element","dragularService","$timeout"],e.exports=t},function(e,n){"use strict";var t=function(e,n){n.cleanEnviroment(),n(e.children(),{moves:function(e,n,t){return t.classList.contains("handle")}})};t.$inject=["$element","dragularService"],e.exports=t},function(e,n){"use strict";var t=function(e,n,t){e.items1=[{content:"Move me, but you can only drop me in one of these containers."},{content:"If you try to drop me somewhere other than these containers, I'll just come back."},{content:"Item 3"},{content:"Item 4"}],e.cartModel=[];var o=document.querySelector("#containerLeft");t.cleanEnviroment(),t([o],{containersModel:[e.items1],copy:!0,isContainer:function(e){return"cart"===e.id},isContainerModel:function(){return e.cartModel}}),e.removeItem=function(){var n=e.cartModel.indexOf(this.item);e.cartModel.splice(n,1)}};t.$inject=["$scope","$element","dragularService"],e.exports=t},function(e,n){"use strict";var t=function(e,n){n.cleanEnviroment(),n([e.children()[0],e.children()[2]],{nameSpace:"apples"}),n(e.children()[1],{nameSpace:"oranges"}),n(e.children()[3],{nameSpace:["oranges","apples"]})};t.$inject=["$element","dragularService"],e.exports=t},function(e,n){"use strict";var t=function(e,n,t,o){e(function(){o.cleanEnviroment(),o(t,{nameSpace:"rows",moves:function(e,n,t){return t.classList.contains("row-handle")}}),o(t.children(),{nameSpace:"cells",moves:function(e,n,t){return!t.classList.contains("row-handle")}})},0),n.items=[{items:[{content:"Item a1"},{content:"Item a2"},{content:"Item a3"},{content:"Item a4"}]},{items:[{content:"Item b1"},{content:"Item b2"},{content:"Item b3"},{content:"Item b4"}]},{items:[{content:"Item c1"},{content:"Item c2"},{content:"Item c3"},{content:"Item c4"}]}]};t.$inject=["$timeout","$scope","$element","dragularService"],e.exports=t},function(e,n){"use strict";var t=function(e,n,t,o){e(function(){var e=t.children().eq(0).children(),i=e.children(),r=[];o.cleanEnviroment(),o(e,{moves:function(e,n,t){return t.classList.contains("row-handle")},containersModel:n.items,nameSpace:"rows"});for(var l=0;lInstall\n

download dragular.js and dragular.css from dist folder

\n

OR clone git

\n
\ngit clone http://github.com/luckylooke/dragular.git\n
\n

OR use npm

\n
\n[sudo] npm install dragular\n
\n

OR use bower

\n
\nbower install dragular\n
\n

AND 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
\n

AND put dragularModule into dependency array

\n
\nvar app = angular.module('myApp', ['dragularModule', 'otherDependencies']);\n
\n

DONE :)

\n"),e.put("exampleBasic/exampleBasic.html","
\n

Basic

\n \n
\n
\n
Move me, but you can only drop me in one of these containers.
\n
If you try to drop me somewhere other than these containers, I'll just come back.
\n
Item 3.
\n
Item 6.
\n
\n
\n
You can drop me in the left container, otherwise I'll stay here.
\n
Try to click me, dragular distinguish drag from click
\n
Item 5.
\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      
\n
\n"),e.put("exampleBasicWithModel/exampleBasicWithModel.html","
\n

Basic - with model

\n \n
\n
\n
\n
{{item.content}}
\n
\n
\n
{{item.content}}
\n
\n
\n
\n
\n
Items1:\n          
{{items1 | json}}
\n
\n
\n
Items2:\n          
{{items2 | json}}
\n
\n
\n
\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"),e.put("exampleBoundingBox/exampleBoundingBox.html","
\n

BoundingBox

\n \n
\n
\n
This items cannot cross its example element, just try it your selves.
\n
Item 2.
\n
Item 3.
\n
Item 6.
\n
\n
\n
This items cannot cross its example element, just try it your selves.
\n
Item 4.
\n
Item 5.
\n
\n
\n
\n        \n  dragularService([$element.children(), {\n    boundingBox: $element\n  });\n        \n      
\n
"),e.put("exampleBoundingBoxLockX/exampleBoundingBoxLockX.html",'
\n

BoundingBox and lockX

\n \n
\n
\n
\n
Items are locked in X axis movement and cannot cross its closest parent div.boundingBox, just try it your selves.
\n
item 2
\n
item 3
\n
item 4
\n
\n
\n
\n
\n        \n  dragularService([$element.children()[0].children(), {\n    boundingBox: $element.children()[0],\n    lockX: true\n  });\n        \n      
\n
'),e.put("exampleBoundingBoxLockY/exampleBoundingBoxLockY.html","
\n

BoundingBox and LockY

\n \n
\n
\n
\n
Items are locked in Y axis movement and cannot cross its closest parent div.boundingBox, just try it your selves.
\n
item 2
\n
item 3
\n
item 4
\n
item 5
\n
item 6
\n
\n
\n
\n
\n        \n  dragularService([$element.children()[0].children(), {\n    boundingBox: $element.children()[0],\n    lockY: true\n  });\n        \n      
\n
"),e.put("exampleCopy/exampleCopy.html","
\n

Copy

\n \n
\n
\n
Move me, and make copy on drop.
\n
If you try to drop me somewhere other than these containers, I'll just come back.
\n
\n
\n
You can drop me in the left container, otherwise I'll stay here.
\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"),e.put("exampleCopyWithModel/exampleCopyWithModel.html","
\n

Copy - with model

\n \n
\n
\n
\n
{{item.content}}
\n
\n
\n
{{item.content}}
\n
\n
\n
\n
\n
Items1:\n
\n            {{ items1 | json }}\n          
\n
\n
\n
\n
Items2:\n
\n            {{ items2 | json }}\n          
\n
\n
\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"),e.put("exampleCustomClasses/exampleCustomClasses.html","
\n

Custom classes

\n \n
\n
\n
Move me, but you can only drop me in one of these containers.
\n
If you try to drop me somewhere other than these containers, I'll just come back.
\n
Item 3.
\n
Item 6.
\n
\n
\n
You can drop me in the left container, otherwise I'll stay here.
\n
Item 4.
\n
Item 5.
\n
\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      
\n
\n"),e.put("exampleDifferentOptionsWithModel/exampleDifferentOptionsWithModel.html","
\n

Different options - with model

\n \n
\n
\n
\n
{{item.content}}
\n
\n
\n
{{item.content}}
\n
\n
\n
\n
\n
Items1:\n          
{{items1 | json}}
\n
\n
\n
Items2:\n          
{{items2 | json}}
\n
\n
\n
\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"),e.put("exampleDirective/exampleDirective.html","
\n

Directive

\n \n
\n
\n
Move me, but you can only drop me in one of these containers.
\n
If you try to drop me somewhere other than these containers, I'll just come back.
\n
Item 3.
\n
Item 6.
\n
\n
\n
You can drop me in the left container, otherwise I'll stay here.
\n
Item 4.
\n
Item 5.
\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"),e.put("exampleDirectiveWithModel/exampleDirectiveWithModel.html","
\n

Directive - with model

\n \n
\n
\n
\n
{{item.content}}
\n
\n
\n
{{item.content}}
\n
\n
\n
\n
\n
Items1:\n
{{items1 | json}}
\n
\n
\n
Items2:\n
{{items2 | json}}
\n
\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      
\n
\n"),e.put("exampleDragOverEvents/exampleDragOverEvents.html","
\n

Drag-over events

\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\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
dragularService.shared.itemitem beeing dragged (it is copy of item if copy is enabled via options)
dragularService.shared.sourcesource container item is dragged from
dragularService.shared.sourceModelsource container model representation if model was porvided
dragularService.shared.initialIndexoriginal index of item, can be used to get item model from sourceModel
dragularService.shared.extracontains accepting information (boolean) on dragenter, element drag is leaving to on dragleave and element behind the cursor on dragrelease
\n
\n\n

Try to drag over the not-container too.

\n
\n
\n
apples and oranges cannot be mixed
\n
apple 2
\n
apple 3
\n
apple 4
\n
\n
\n
orange 1
\n
orange 2
\n
orange 3
\n
orange 4
\n
\n
\n
apple 5
\n
apple 6
\n
apple 7
\n
apple 8
\n
\n
\n
orange 5
\n
orange 6
\n
orange 7
\n
orange 8
\n
\n
\n
Test active class on NOT container.
\n\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  
\n
\n"),e.put("exampleEvents/exampleEvents.html","
\n

Events

\n \n
\n
\n
Move me, but you can only drop me in one of these containers.
\n
If you try to drop me somewhere other than these containers, I'll just come back.
\n
Item 3.
\n
Item 6.
\n
\n
\n
You can drop me in the left container, otherwise I'll stay here.
\n
Item 4.
\n
Item 5.
\n
\n
\n
\n        \n.controller('Events', ['$scope', '$element', 'dragularService', '$timeout', function TodoCtrl($scope, $element, dragularService, $timeout) {\n    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'));\n    $scope.$on('dragulardrag', myFn('drag'));\n    $scope.$on('dragularcancel', myFn('cancel'));\n    $scope.$on('dragulardrop', myFn('drop'));\n    $scope.$on('dragularremove', myFn('remove'));\n    $scope.$on('dragulardragend', myFn('dragend'));\n    $scope.$on('dragularshadow', myFn('shadow'));\n\n    function myFn(eventName) {\n      return function() {\n        console.log(eventName, arguments);\n      };\n    }\n\n  }]);\n        \n      
\n
\n"),e.put("exampleHandle/exampleHandle.html","
\n

Handle

\n \n
\n
\n
+Move me, but you can use the plus sign to drag me around.
\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      
\n
\n"),e.put("exampleIsContainerWithModel/exampleIsContainerWithModel.html","
\n

isContainer - with model

\n \n
\n
\n
\n
{{item.content}}
\n
\n
\n
{{item.content}}\n
\n
\n
\n
\n
\n
Items1:\n          
{{items1 | json}}
\n
\n
\n
Cart:\n          
{{cartModel | json}}
\n
\n
\n
\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
\n"), -e.put("exampleNameSpaces/exampleNameSpaces.html","
\n

NameSpaces

\n \n
\n
\n
try to mix oranges and apples
\n
apple 2
\n
apple 3
\n
apple 4
\n
\n
\n
orange 1
\n
orange 2
\n
orange 3
\n
orange 4
\n
\n
\n
apple 5
\n
apple 6
\n
apple 7
\n
apple 8
\n
\n
\n
mixed 1
\n
mixed 2
\n
mixed 3
\n
mixed 4
\n
\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
"),e.put("exampleNestedNgRepeat/exampleNestedNgRepeat.html","
\n

Nested ngRepeat

\n \n
\n
\n
Row {{$index}}
\n
{{item.content}}
\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"),e.put("exampleNestedNgRepeatWithModel/exampleNestedNgRepeatWithModel.html","
\n

Nested ngRepeat - with model

\n \n
\n
\n
\n
\n
Row {{::$index}}
\n
\n
{{item.content}}
\n
\n
\n
\n
\n
\n
\n
\n            
Items:\n
{{items | json}}
\n
\n
\n
\n
\n
\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"),e.put("exampleNgRepeat/exampleNgRepeat.html","
\n

ngRepeat

\n \n
\n
\n
\n {{item.content}}\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
\n"),e.put("exampleNgRepeatFilteredWithModel/exampleNgRepeatFilteredWithModel.html","
\n

Filtered ngRepeat - with model

\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!

\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n
{{item.content}}
\n
\n
\n
{{item.content}}
\n
\n
\n
\n
\n
Items1:\n          
{{items1 | json}}
\n
\n
\n
Items2:\n          
{{items2 | json}}
\n
\n
\n
\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"),e.put("exampleNgRepeatWithModel/exampleNgRepeatWithModel.html","
\n

ngRepeat - with model

\n \n
\n
\n
\n
\n {{item.content}}\n \n \n
\n
\n
\n
\n
\n
Items:\n
{{items | json}}
\n
\n
\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"),e.put("exampleRemoveOnSpill/exampleRemoveOnSpill.html","
\n

Remove on spill

\n \n
\n
\n
Move me, but you can only drop me in containers.
\n
If you try to drop me somewhere other than containers, I'll die a fiery death.
\n
Item 3.
\n
Item 6.
\n
Item 4.
\n
Item 5.
\n
\n \n
\n
\n        \n  dragularService([document.getElementById(single)], { removeOnSpill: true });\n        \n      
\n
"),e.put("exampleRemoveOnSpillWithModel/exampleRemoveOnSpillWithModel.html","
\n

Remove on spill - with model

\n \n
\n
\n
\n
{{item.content}}
\n
\n
\n
{{item.content}}
\n
\n
\n
\n
\n
Items1:\n          
{{items1 | json}}
\n
\n
\n
Items2:\n          
{{items2 | json}}
\n
\n
\n
\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"),e.put("exampleRevertOnSpill/exampleRevertOnSpill.html","
\n

Revert on spill

\n \n
\n
\n
Move me, but you can only drop me in one of these containers.
\n
If you try to drop me somewhere other than these containers, I'll just come back.
\n
Item 3.
\n
Item 6.
\n
\n
\n
You can drop me in the left container, otherwise I'll stay here.
\n
Item 4.
\n
Item 5.
\n
\n
\n
\n        \n  dragularService([document.getElementById(left), document.getElementById(right)], { revertOnSpill: true });\n        \n      
\n
"),e.put("exampleScrollingDrag/exampleScrollingDrag.html",'
\n

Scrolling drag

\n \n
\n
\n
up
\n
\n
Item 1.
\n
Item 2.
\n
Item 3.
\n
Item 4.
\n
Item 5.
\n
Item 6.
\n
Item 7.
\n
Item 9.
\n
Item 10.
\n
Item 11.
\n
Item 12.
\n
Item 13.
\n
\n
down
\n
\n
\n
\n
\n
Item 1.
\n
Item 2.
\n
Item 3.
\n
Item 4.
\n
Item 5.
\n
Item 6.
\n
Item 7.
\n
Item 9.
\n
Item 10.
\n
Item 11.
\n
Item 12.
\n
Item 13.
\n
\n
\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'),e.put("partials/partial-contribute.html",'
\n
\n
\n \n
\n
\n
\n'),e.put("partials/partial-docs.html",'
\n
\n \n \n
\n

\n \n

\n \n
\n
\n \n
\n \n
\n'),e.put("partials/partial-home.html",'
\n
\n \n
\n
\n

DRAGULAR

\n

Angular drag&drop based on dragula.

\n

Live examples in docs

\n
\n
\n
\n

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

\n

Inspiration

\n

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

\n

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

\n

Differences of dragular (against dragula)

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

Todo

\n
    \n
  • improve docs
  • \n
\n

Features

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

For installation, usage and examples go to docs

\n
\n
\n \n
\n \n
\n \n
\n'),e.put("partials/autogenerated/contribute.html",'

How to contribute

\n

It'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.

\n

Before contributing, please read the code of conduct.

\n

Reporting issues

\n

GitHub 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:

\n

1. 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.

\n

2. Not sure if it's a bug?. Then please ask via issues and tag it [question].

\n

3. 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.

\n

4. Include a live example. After narrowing your code down to only the problem areas, make use of jsFiddle, 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 fiddle)

\n

5. 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.

\n

Dev vs. Master

\n

The 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.

\n

Making Changes

\n

To take advantage of our npm build script and jshint config it will be easiest for you if you have node.js installed locally.

\n

You can download node.js from nodejs.org.

\n

After 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.

\n

Developing

\n

There are several gulp tasks that are used for generating different builds:

\n
    \n
  • gulp dev - Serves files with BrowserSync server, watches & automatically refreshes connected browsers on changes, generates non-minified but concatenated styles & scripts from the dragular source.
  • \n
  • gulp dev:docs - Does exactly the same as gulp dev, except it works with the documentation source.
  • \n
  • gulp build - Concatenates and minifies dragular source files.
  • \n
  • gulp build:docs - Concatenates and minifies documentation source files.
  • \n
\n

Linting

\n
    \n
  • gulp lint & gulp lint:docs - Lint JavaScript files.
  • \n
\n

Making a pull request

\n

Once that is ready, make your changes and submit a Pull Request:

\n
    \n
  • Send 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.

    \n
  • \n
  • Ensure changes are jshint validated. Our JSHint configuration file is provided in the repository and you should check against it before submitting.

    \n
  • \n
  • Only 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.

    \n
  • \n
\n

Dependencies for building from source and running tests:

\n

Coding style preferences are not contributions

\n

If 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.

\n

I don't really like git / node.js, but I can fix this bug

\n

That 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'); +!function(e,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var t=n();for(var o in t)("object"==typeof exports?exports:e)[o]=t[o]}}(this,function(){return function(e){function n(o){if(t[o])return t[o].exports;var i=t[o]={exports:{},id:o,loaded:!1};return e[o].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}var t={};return n.m=e,n.c=t,n.p="",n(0)}([function(e,n,t){"use strict";var o=t(1),i=t(4),r=t(5),l=t(6),a=t(7),c=t(8),s=t(9),d=t(10),m=t(11),u=t(12),p=t(13),v=t(14),g=t(15),h=t(16),f=t(17),b=t(18),y=t(19),x=t(20),I=t(21),w=t(22),S=t(23),M=t(24),$=t(25),q=t(26),C=t(27),B=t(28),k=t(29);t(30),angular.module("examplesApp",[o,"templates","ui.router"]).config(i).controller("Basic",r).controller("BasicModel",l).controller("BoundingBox",a).controller("BoundingBoxLockX",c).controller("BoundingBoxLockY",s).controller("Copy",d).controller("CopyModel",m).controller("CustomClasses",u).controller("DifferentOptionsModel",p).controller("Directive",v).controller("DirectiveModel",g).controller("DragOverEvents",h).controller("Events",f).controller("Handle",b).controller("IsContainerModel",y).controller("NameSpaces",x).controller("NestedNgRepeat",I).controller("NestedNgRepeatWithModel",w).controller("NgRepeat",S).controller("NgRepeatFilteredWithModel",M).controller("NgRepeatWithModel",$).controller("RemoveOnSpill",q).controller("RemoveOnSpillWithModel",C).controller("RevertOnSpill",B).controller("ScrollingDrag",k).controller("ExAppCtrl",["$scope",function(e){e.examplesList=[{template:"docsInstall/docsInstall.html",link:"docsInstall",title:"Installation"},{template:"exampleBasic/exampleBasic.html",link:"exampleBasic",title:"Basic"},{template:"exampleBasicWithModel/exampleBasicWithModel.html",link:"exampleBasicWithModel",title:"Basic - with model"},{template:"exampleDifferentOptionsWithModel/exampleDifferentOptionsWithModel.html",link:"exampleDifferentOptionsWithModel",title:"Different options - with model"},{template:"exampleDirective/exampleDirective.html",link:"exampleDirective",title:"Directive"},{template:"exampleDirectiveWithModel/exampleDirectiveWithModel.html",link:"exampleDirectiveWithModel",title:"Directive - with model"},{template:"exampleEvents/exampleEvents.html",link:"exampleEvents",title:"Events"},{template:"exampleRemoveOnSpill/exampleRemoveOnSpill.html",link:"exampleRemoveOnSpill",title:"Remove on spill"},{template:"exampleRemoveOnSpillWithModel/exampleRemoveOnSpillWithModel.html",link:"exampleRemoveOnSpillWithModel",title:"Remove on spill - with model"},{template:"exampleRevertOnSpill/exampleRevertOnSpill.html",link:"exampleRevertOnSpill",title:"Revert on spill"},{template:"exampleCopy/exampleCopy.html",link:"exampleCopy",title:"Copy"},{template:"exampleCopyWithModel/exampleCopyWithModel.html",link:"exampleCopyWithModel",title:"Copy - with model"},{template:"exampleHandle/exampleHandle.html",link:"exampleHandle",title:"Handle"},{template:"exampleIsContainerWithModel/exampleIsContainerWithModel.html",link:"exampleIsContainerWithModel",title:"isContainer - with model"},{template:"exampleCustomClasses/exampleCustomClasses.html",link:"exampleCustomClasses",title:"Custom classes"},{template:"exampleNameSpaces/exampleNameSpaces.html",link:"exampleNameSpaces",title:"NameSpaces"},{template:"exampleDragOverEvents/exampleDragOverEvents.html",link:"exampleDragOverEvents",title:"Drag-over events"},{template:"exampleBoundingBox/exampleBoundingBox.html",link:"exampleBoundingBox",title:"BoundingBox"},{template:"exampleBoundingBoxLockX/exampleBoundingBoxLockX.html",link:"exampleBoundingBoxLockX",title:"BoundingBox + LockX"},{template:"exampleBoundingBoxLockY/exampleBoundingBoxLockY.html",link:"exampleBoundingBoxLockY",title:"BoundingBox + LockY"},{template:"exampleNgRepeat/exampleNgRepeat.html",link:"exampleNgRepeat",title:"ngRepeat"},{template:"exampleNgRepeatWithModel/exampleNgRepeatWithModel.html",link:"exampleNgRepeatWithModel",title:"ngRepeat - with model"},{template:"exampleNgRepeatFilteredWithModel/exampleNgRepeatFilteredWithModel.html",link:"exampleNgRepeatFilteredWithModel",title:"Filtered ngRepeat - with model"},{template:"exampleNestedNgRepeat/exampleNestedNgRepeat.html",link:"exampleNestedNgRepeat",title:"Nested ngRepead"},{template:"exampleNestedNgRepeatWithModel/exampleNestedNgRepeatWithModel.html",link:"exampleNestedNgRepeatWithModel",title:"Nested ngRepead - with model"},{template:"exampleScrollingDrag/exampleScrollingDrag.html",link:"exampleScrollingDrag",title:"Scrolling drag"}],e.highlightCode=function(){if(document.getElementsByTagName("code").length)for(var e=document.getElementsByTagName("code"),n=e.length-1;n>=0;n--)hljs.highlightBlock(e[n])};var n;e.toggleSidebar=function(){n||(n=angular.element(document.getElementById("rowOffcanvas"))),n.toggleClass("active")}}])},function(e,n,t){"use strict";var o=t(2),i=t(3);e.exports="dragularModule",angular.module("dragularModule",[]).factory("dragularService",i).directive("dragular",o)},function(e,n){"use strict";var t=function(e){return{restrict:"A",link:function(n,t,o){function i(e){try{return JSON.parse(e)}catch(n){return}}var r=n.$eval(o.dragular)||i(o.dragular)||{};o.dragularModel&&(r.containersModel=o.dragularModel,r.scope||(r.scope=n)),o.dragularNameSpace&&(r.nameSpace=o.dragularNameSpace.split(" ")),o.dragularOnInit&&(r.onInit=n.$eval(o.dragularOnInit)),e(t[0],r)}}};t.$inject=["dragularService"],e.exports=t},function(e,n){"use strict";var t={classesCache:{},containersCtx:{},containers:{},mirror:null,source:null,item:null,copy:null,sourceItem:null,sourceModel:null,sourceFilteredModel:null,target:null,targetCtx:null,targetModel:null,lastDropTarget:null,offsetX:null,offsetY:null,moveX:null,moveY:null,offsetXr:null,offsetYb:null,clientX:null,clientY:null,mirrorWidth:null,mirrorHeight:null,initialSibling:null,currentSibling:null,initialIndex:null,currentIndex:null,tempModel:null,dragOverEvents:{},lastElementBehindCursor:null,grabbed:null},o=function(e,n){function o(o,m){function b(){1!==arguments.length||R(o)||angular.isElement(o)||o[0]||"string"==typeof o?"string"==typeof o&&(pe=document.querySelectorAll(o)):(ve=o||{},pe=[]),ue=ve.copyOptions?angular.copy(ve):ve}function I(){var e=angular.extend({},be,ue);angular.extend(ue,e),ue.classes&&(e=angular.extend({},he,ue.classes),angular.extend(ue.classes,e)),ue.eventNames&&(e=angular.extend({},fe,ue.eventNames),angular.extend(ue.eventNames,e))}function $(){f(ue.boundingBox)||(ue.boundingBox=!1),ue.containers&&(pe=ue.containers),ue.containers=i(pe,!1,ue.scope),ue.containersModel=i(ue.containersModel,!0,ue.scope),R(ue.containersFilteredModel)?ue.containersFilteredModel=R(ue.containersFilteredModel[0])?ue.containersFilteredModel:[ue.containersFilteredModel]:ue.containersFilteredModel=[],ue.nameSpace||(ue.nameSpace=["dragularCommon"]),R(ue.nameSpace)||(ue.nameSpace=[ue.nameSpace]),ue.nameSpace.forEach(function(e){t.containers[e]||(t.containers[e]=[],t.containersCtx[e]=[]);for(var n=Z(ue).length,o=t.containers[e].length,i=0;ir.left+t.offsetX&&or.top+t.offsetY&&it)return i;if(!a&&r.top>o)return i}return null}function r(){var e=n.getBoundingClientRect();return l(a?t>e.left+p(e)/2:o>e.top+v(e)/2)}function l(e){return e?h(n):n}var a="horizontal"===ue.direction;return n!==e?r():i()}function _(e,n,t){var o,i=e||{},r=i.className;return i.className+=" "+ue.classes.hide,o=k.elementFromPoint(n,t),i.className=r,o}function K(e){if(!e)return!1;for(var n=ue.nameSpace.length;n--;)if(t.containers[ue.nameSpace[n]].indexOf(e)!==-1)return!0;return ue.isContainer(e)?(t.tempModel=ue.isContainerModel(e),!0):(t.tempModel=null,!1)}function Z(e){return ne("containers",e)}function ee(e){return ne("containersModel",e,!0)}function ne(e,n,o){return N(n[e])?i(n[e](n===ue?ye:null,t),o,n.scope):n[e]}function te(e){if(ye.dragging){var n=arguments.length>0?e:ge(ue.revertOnSpill),o=S(t.item),i=z(o);i||t.copy||!n||t.source.insertBefore(t.item,t.initialSibling),!t.sourceModel||t.copy||n?ue.scope&&(i||n)&&ue.scope.$emit(ue.eventNames.dragularcancel,t.item,t.source,t.sourceModel,t.initialIndex):ie(t.item,o),(!t.sourceModel||t.copy||n||i)&&le()}}function oe(e){if(F(),ye.dragging){e.originalEvent&&(e=e.originalEvent),t.clientX=w("clientX",e),t.clientY=w("clientY",e);var n=_(t.mirror,t.clientX,t.clientY),o=P(n,t.clientX,t.clientY);o&&(t.copy&&ge(ue.copySortSource)||!t.copy||o!==t.source)?ie(t.item,o):ge(ue.removeOnSpill)?re():te(),t.target=null,t.lastElementBehindCursor&&C(t.lastElementBehindCursor,t.dragOverEvents.dragularrelease,n),ue.scope&&ue.scope.$emit(ue.eventNames.dragularrelease,t.item,t.source,e)}}function ie(o,i){function l(){if(Z(ue).forEach(function(e){r(e,"off","mousedown",j),r(e,"on","mousedown",j)}),ue.compileItemOnDrop){var e=angular.element(i).scope?angular.element(i).scope():ue.scope;e&&e.$applyAsync(function(){var r=n(t.copy?a.cloneNode(!0):a)(e);o.parentNode===i&&i.removeChild(o),i.insertBefore(r[0],c),le()})}ue.scope&&(z(i)?ue.scope.$emit(ue.eventNames.dragularcancel,o,t.source,t.sourceModel,t.initialIndex):ue.scope.$emit(ue.eventNames.dragulardrop,o,i,t.source,t.sourceModel,t.initialIndex,t.targetModel,s)),ue.compileItemOnDrop||le()}if(!o)return void le();var a=t.sourceItem,c=t.currentSibling,s=q(o,i);t.copy&&i===t.source&&S(o)&&ge(ue.copySortSource)&&o.parentNode.removeChild(t.sourceItem),t.sourceModel&&!z(i)?(t.targetCtx&&t.targetCtx.fm&&(s=t.targetCtx.m.indexOf(t.targetCtx.fm[s])),t.sourceFilteredModel&&(t.initialIndex=t.sourceModel.indexOf(t.sourceFilteredModel[t.initialIndex])),e.$applyAsync(function(){t.sourceModel&&(i===t.source?t.sourceModel.splice(s,0,t.sourceModel.splice(t.initialIndex,1)[0]):(t.dropElmModel=t.copy&&!ue.dontCopyModel?angular.copy(t.sourceModel[t.initialIndex]):t.sourceModel[t.initialIndex],t.tempModel?t.targetModel=t.tempModel:t.targetModel=t.targetCtx&&t.targetCtx.m||t.sourceModel,o.parentNode.removeChild(o),t.copy||t.sourceModel.splice(t.initialIndex,1),t.targetModel&&t.targetModel.splice(s,0,t.dropElmModel)),S(o)&&o.parentNode.removeChild(o),l())})):l()}function re(){if(ye.dragging){var n=S(t.item);n&&n.removeChild(t.item),t.sourceModel&&e.$applyAsync(function(){t.sourceModel.splice(t.initialIndex,1),le()}),ue.scope&&ue.scope.$emit(t.copy?ue.eventNames.dragularcancel:ue.eventNames.dragularremove,t.item,n,t.sourceModel,t.initialIndex),t.sourceModel||le()}}function le(){F(),de(),t.item&&x(t.item,ue.classes.transit),ye.dragging=!1,ge(ue.removeOnSpill)===!0&&U(),ue.scope&&(t.lastDropTarget&&ue.scope.$emit(ue.eventNames.dragularout,t.item,t.lastDropTarget,t.source),ue.scope.$emit(ue.eventNames.dragulardragend,t.item)),t.source=t.item=t.sourceItem=t.initialSibling=t.currentSibling=t.sourceModel=null,t.initialIndex=t.currentIndex=t.lastDropTarget=t.tempModel=t.targetModel=null,t.dropElmModel=t.targetCtx=t.copy=t.moveX=t.moveY=null}function ae(){O(!0),ce(ue.containers),oe({})}function ce(n){e.$applyAsync(function(){var e=R(n)?n:c(n);e.forEach(function(e){angular.forEach(ue.nameSpace,function(n){var o;o=t.containers[n].indexOf(e),t.containers[n].splice(o,1),t.containersCtx[n].splice(o,1)})})})}function se(e){if(t.target){e.originalEvent&&(e=e.originalEvent);var n=t.target.scrollTop;t.target.scrollTop+=e.deltaY,n!==t.target.scrollTop&&(e.stopPropagation(),e.preventDefault())}}function de(){t.mirror&&(x(k.body,ue.classes.unselectable),r(E,"off","mousemove",H),r(t.mirror,"off","wheel",se),S(t.mirror)&&t.mirror.parentNode.removeChild(t.mirror),t.mirror=null)}function me(e){i(e,!0,ue.scope)}var ue,pe=o||[],ve=m||{},ge=B,he={mirror:"gu-mirror",hide:"gu-hide",unselectable:"gu-unselectable",transit:"gu-transit"},fe={dragularenter:"dragularenter",dragularleave:"dragularleave",dragularrelease:"dragularrelease",dragularcloned:"dragularcloned",dragulardrag:"dragulardrag",dragularcancel:"dragularcancel",dragulardrop:"dragulardrop",dragularremove:"dragularremove",dragulardragend:"dragulardragend",dragularshadow:"dragularshadow",dragularover:"dragularover",dragularout:"dragularout"},be={copyOptions:!1,classes:he,eventNames:fe,containers:!1,containersModel:!1,containersFilteredModel:!1,isContainer:l,isContainerModel:g,isContainerAccepts:a,moves:a,accepts:a,canBeAccepted:a,copy:!1,copySortSource:!1,dontCopyModel:!1,invalid:l,revertOnSpill:!1,removeOnSpill:!1,lockX:!1,lockY:!1,boundingBox:!1,mirrorContainer:k.body,ignoreInputTextSelection:!0,compileItemOnDrop:!1,onInit:!1},ye={containers:t.containers,containersCtx:t.containersCtx,sanitizeContainersModel:me,sanitizeContainers:i,isContainer:K,start:W,end:A,cancel:te,remove:re,destroy:ae,dragging:!1};return b(),I(),$(),O(),ue.onInit&&ue.onInit(ye,ue),ye}function i(e,n,t){if(N(e))return e;if(R(e))return n?R(e[0])?e:[e]:e;if("string"==typeof e&&t){var o=t.$eval(e);return N(o)?o:function(){return t.$eval(e)}}return e?c(e):[]}function r(e,n,t,o){var i={mouseup:"touchend",mousedown:"touchstart",mousemove:"touchmove"},r={mouseup:"pointerup",mousedown:"pointerdown",mousemove:"pointermove"},l={mouseup:"MSPointerUp",mousedown:"MSPointerDown",mousemove:"MSPointerMove"},a=angular.element(e);if(e.addEventListener){var c={on:"addEventListener",off:"removeEventListener"};e[c[n]](t,o,{passive:!1}),e[c[n]](i[t],o,{passive:!1})}else"undefined"!=typeof navigator&&navigator.pointerEnabled&&r[t]?a[n](r[t],o):"undefined"!=typeof navigator&&navigator.msPointerEnabled&&l[t]?a[n](l[t],o):i[t]&&a[n](i[t],o),a[n](t,o)}function l(){return!1}function a(){return!0}function c(e,n){return R(e)?e:e.length?Array.prototype.slice.call(e,n):[e]}function s(e){if(e.touches)return e.touches.length;if(e.originalEvent&&e.originalEvent.touches)return e.originalEvent.touches.length;if(void 0!==e.which&&0!==e.which)return e.which;if(void 0!==e.buttons)return e.buttons;var n=e.button;return void 0!==n?1&n?1:2&n?3:4&n?2:0:void 0}function d(e){e.originalEvent&&(e=e.originalEvent),t.grabbed&&e.preventDefault()}function m(e,n){return"undefined"!=typeof window[n]?window[n]:E.clientHeight?E[e]:k.body[e]}function u(e){var n=e.getBoundingClientRect(),t=m("scrollTop","pageYOffset"),o=m("scrollLeft","pageXOffset");return{left:n.left+o,right:n.right+o,top:n.top+t,bottom:n.bottom+t}}function p(e){return e.width||e.right-e.left}function v(e){return e.height||e.bottom-e.top}function g(){return{}}function h(e){function n(){var n=e;do n=n.nextSibling;while(n&&1!==n.nodeType);return n}if(e)return e.nextElementSibling||n()}function f(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName}function b(e){var n=t.classesCache[e];return n?n.lastIndex=0:t.classesCache[e]=n=new RegExp("(?:^|\\s)"+e+"(?:\\s|$)","g"),n}function y(e,n){var t=e.className;t.length?b(n).test(t)||(e.className+=" "+n):e.className=n}function x(e,n){e.className=e.className.replace(b(n)," ").trim()}function I(e){return e.targetTouches&&e.targetTouches.length?e.targetTouches[0]:e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e}function w(e,n){var t=I(n),o={pageX:"clientX",pageY:"clientY"};return e in o&&!(e in t)&&o[e]in t&&(e=o[e]),!t.type||t.type.indexOf("touch")<0?t[e]:t.type.indexOf("end")===-1&&t.originalEvent.touches[0][e.replace("client","page")]}function S(e){return e.parentNode===document?null:e.parentNode}function M(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName||"SELECT"===e.tagName||$(e)}function $(e){return!!e&&("false"!==e.contentEditable&&("true"===e.contentEditable||$(S(e))))}function q(e,n){return Array.prototype.indexOf.call(angular.element(n).children(),e)}function C(e,n,o){e&&(t.extra=o,e.dispatchEvent?e.dispatchEvent(n):e.fireEvent("on"+n.eventType,n))}function B(e,n,o){return N(e)?!!e.apply(o||this,n||t):!!e}var k=document,E=k.documentElement,R=Array.isArray,N=angular.isFunction;return o.cleanEnviroment=function(){t.classesCache={},t.containersCtx={},t.containers={},t.mirror=void 0},o.shared=t,o};o.$inject=["$rootScope","$compile"],e.exports=o},function(e,n){"use strict";var t=function(e,n){n.otherwise("/home");var t,o=function(e,n,o){n.link?o.cancel(t):t=o(function(){e.go("docs.detail",{link:"docsInstall"})},0)};o.$inject=["$state","$stateParams","$timeout"],e.state("home",{url:"/home",templateUrl:"partials/partial-home.html"}).state("docs",{url:"/docs",templateUrl:"partials/partial-docs.html",controller:o}).state("docs.detail",{url:"/:link",templateUrl:function(e){return e.link+"/"+e.link+".html"},controller:o}).state("contribute",{url:"/contribute",templateUrl:"partials/partial-contribute.html"})};t.$inject=["$stateProvider","$urlRouterProvider"],e.exports=t},function(e,n){"use strict";var t=function(e,n){n.cleanEnviroment(),n(".containerVertical")};t.$inject=["$element","dragularService"],e.exports=t},function(e,n){"use strict";var t=function(e,n,t){e.items1=[{content:"Move me, but you can only drop me in one of these containers."},{content:"If you try to drop me somewhere other than these containers, I'll just come back."},{content:"Item 3"},{content:"Item 4"}],e.items2=[{content:"Item 5"},{content:"Item 6"},{content:"Item 7"},{content:"Item 8"}];var o=n.children().eq(0).children();t.cleanEnviroment(),t([o[0],o[1]],{containersModel:[e.items1,e.items2]})};t.$inject=["$scope","$element","dragularService"],e.exports=t},function(e,n){"use strict";var t=function(e,n){var t=e[0];n.cleanEnviroment(),n(e.children(),{boundingBox:t})};t.$inject=["$element","dragularService"],e.exports=t},function(e,n){"use strict";var t=function(e,n){var t=e.children().children()[0];n.cleanEnviroment(),n(t,{boundingBox:t,lockX:!0})};t.$inject=["$element","dragularService"],e.exports=t},function(e,n){"use strict";var t=function(e,n){var t=e.children().children()[0];n.cleanEnviroment(),n(t,{boundingBox:t,lockY:!0})};t.$inject=["$element","dragularService"],e.exports=t},function(e,n){"use strict";var t=function(e,n){n.cleanEnviroment(),n(e.children(),{copy:!0})};t.$inject=["$element","dragularService"],e.exports=t},function(e,n){"use strict";var t=function(e,n,t){e.items1=[{content:"Move me, and make copy on drop."},{content:"If you try to drop me somewhere other than these containers, I'll just come back."},{content:"Item 3"},{content:"Item 4"}],e.items2=[{content:"Item 5"},{content:"Item 6"},{content:"Item 7"},{content:"Item 8"}];var o=n.children().eq(0).children();t.cleanEnviroment(),t([o[0],o[1]],{containersModel:[e.items1,e.items2],copy:!0})};t.$inject=["$scope","$element","dragularService"],e.exports=t},function(e,n){"use strict";var t=function(e,n){n.cleanEnviroment(),n(e.children(),{classes:{mirror:"custom-green-mirror"}})};t.$inject=["$element","dragularService"],e.exports=t},function(e,n){"use strict";var t=function(e,n,t){function o(e,n,t){if(t===i||t===n)return!0}e.items1=[{content:"Move me, but you can only drop me in one of these containers."},{content:"If you try to drop me somewhere other than these containers, I'll just come back."},{content:"Item 3"},{content:"Item 4"}],e.items2=[{content:"Item 5"},{content:"Item 6"},{content:"Item 7"},{content:"Item 8"}];var i=document.querySelector("#containerLeft"),r=document.querySelector("#containerRight");t.cleanEnviroment(),t([i],{containersModel:[e.items1],copy:!0,copySortSource:!0,accepts:o}),t([r],{containersModel:[e.items2],removeOnSpill:!0,accepts:o})};t.$inject=["$scope","$element","dragularService"],e.exports=t},function(e,n){"use strict";var t=function(e){e.dragularOptions={classes:{mirror:"custom-green-mirror"},nameSpace:"same"}};t.$inject=["$scope"],e.exports=t},function(e,n){"use strict";var t=function(e){e.items1=[{content:"Move me, and make copy on drop."},{content:"If you try to drop me somewhere other than these containers, I'll just come back."},{content:"Item 3"},{content:"Item 4"}],e.items2=[{content:"Item 5"},{content:"Item 6"},{content:"Item 7"},{content:"Item 8"}],e.dragularOptions={containersModel:e.items1,classes:{mirror:"custom-green-mirror"},nameSpace:"common"}};t.$inject=["$scope"],e.exports=t},function(e,n){"use strict";var t=function(e,n){function t(e){e.on("dragularenter",function(t){e[0]===t.target&&e.addClass(n.shared.extra?"gu-over-accept":"gu-over-decline")}),e.on("dragularleave dragularrelease",function(t){(e[0]===t.target&&n.shared.extra&&n.shared.extra.parentElement!==t.target||"dragularrelease"===t.type)&&(e.removeClass("gu-over-accept"),e.removeClass("gu-over-decline"))})}n.cleanEnviroment(),n([e.children()[0],e.children()[2]],{nameSpace:"apples"}),n([e.children()[1],e.children()[3]],{nameSpace:"oranges"}),angular.forEach(e.children(),function(e){t(angular.element(e))});var o=angular.element(document.getElementsByClassName("notContainer"));o.on("dragularenter",function(){o.addClass("gu-over")}),o.on("dragularleave dragularrelease",function(){o.removeClass("gu-over")})};t.$inject=["$element","dragularService"],e.exports=t},function(e,n){"use strict";var t=function(e,n,t,o){function i(e){return function(){}}t.cleanEnviroment();t(n.children(),{scope:e});e.$on("dragulardrag",function(e,n){e.stopPropagation(),n.className=n.className.replace(" ex-moved","")}),e.$on("dragulardrop",function(e,n){e.stopPropagation(),o(function(){n.className+=" ex-moved"},0)}),e.$on("dragularcloned",i("cloned")),e.$on("dragulardrag",i("drag")),e.$on("dragularcancel",i("cancel")),e.$on("dragulardrop",i("drop")),e.$on("dragularremove",i("remove")),e.$on("dragulardragend",i("dragend")),e.$on("dragularshadow",i("shadow"))};t.$inject=["$scope","$element","dragularService","$timeout"],e.exports=t},function(e,n){"use strict";var t=function(e,n){n.cleanEnviroment(),n(e.children(),{moves:function(e,n,t){return t.classList.contains("handle")}})};t.$inject=["$element","dragularService"],e.exports=t},function(e,n){"use strict";var t=function(e,n,t){e.items1=[{content:"Move me, but you can only drop me in one of these containers."},{content:"If you try to drop me somewhere other than these containers, I'll just come back."},{content:"Item 3"},{content:"Item 4"}],e.cartModel=[];var o=document.querySelector("#containerLeft");t.cleanEnviroment(),t([o],{containersModel:[e.items1],copy:!0,isContainer:function(e){return"cart"===e.id},isContainerModel:function(){return e.cartModel}}),e.removeItem=function(){var n=e.cartModel.indexOf(this.item);e.cartModel.splice(n,1)}};t.$inject=["$scope","$element","dragularService"],e.exports=t},function(e,n){"use strict";var t=function(e,n){n.cleanEnviroment(),n([e.children()[0],e.children()[2]],{nameSpace:"apples"}),n(e.children()[1],{nameSpace:"oranges"}),n(e.children()[3],{nameSpace:["oranges","apples"]})};t.$inject=["$element","dragularService"],e.exports=t},function(e,n){"use strict";var t=function(e,n,t,o){e(function(){o.cleanEnviroment(),o(t,{nameSpace:"rows",moves:function(e,n,t){return t.classList.contains("row-handle")}}),o(t.children(),{nameSpace:"cells",moves:function(e,n,t){return!t.classList.contains("row-handle")}})},0),n.items=[{items:[{content:"Item a1"},{content:"Item a2"},{content:"Item a3"},{content:"Item a4"}]},{items:[{content:"Item b1"},{content:"Item b2"},{content:"Item b3"},{content:"Item b4"}]},{items:[{content:"Item c1"},{content:"Item c2"},{content:"Item c3"},{content:"Item c4"}]}]};t.$inject=["$timeout","$scope","$element","dragularService"],e.exports=t},function(e,n){"use strict";var t=function(e,n,t,o){e(function(){var e=t.children().eq(0).children(),i=e.children(),r=[];o.cleanEnviroment(),o(e,{moves:function(e,n,t){return t.classList.contains("row-handle")},containersModel:n.items,nameSpace:"rows"});for(var l=0;lInstall\n

download dragular.js and dragular.css from dist folder

\n

OR clone git

\n
\ngit clone http://github.com/luckylooke/dragular.git\n
\n

OR use npm

\n
\n[sudo] npm install dragular\n
\n

OR use bower

\n
\nbower install dragular\n
\n

AND 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
\n

AND put dragularModule into dependency array

\n
\nvar app = angular.module('myApp', ['dragularModule', 'otherDependencies']);\n
\n

DONE :)

\n"),e.put("exampleBasicWithModel/exampleBasicWithModel.html","
\n

Basic - with model

\n \n
\n
\n
\n
{{item.content}}
\n
\n
\n
{{item.content}}
\n
\n
\n
\n
\n
Items1:\n          
{{items1 | json}}
\n
\n
\n
Items2:\n          
{{items2 | json}}
\n
\n
\n
\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"),e.put("exampleBasic/exampleBasic.html","
\n

Basic

\n \n
\n
\n
Move me, but you can only drop me in one of these containers.
\n
If you try to drop me somewhere other than these containers, I'll just come back.
\n
Item 3.
\n
Item 6.
\n
\n
\n
You can drop me in the left container, otherwise I'll stay here.
\n
Try to click me, dragular distinguish drag from click
\n
Item 5.
\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      
\n
\n"),e.put("exampleBoundingBox/exampleBoundingBox.html","
\n

BoundingBox

\n \n
\n
\n
This items cannot cross its example element, just try it your selves.
\n
Item 2.
\n
Item 3.
\n
Item 6.
\n
\n
\n
This items cannot cross its example element, just try it your selves.
\n
Item 4.
\n
Item 5.
\n
\n
\n
\n        \n  dragularService([$element.children(), {\n    boundingBox: $element\n  });\n        \n      
\n
"),e.put("exampleBoundingBoxLockX/exampleBoundingBoxLockX.html",'
\n

BoundingBox and lockX

\n \n
\n
\n
\n
Items are locked in X axis movement and cannot cross its closest parent div.boundingBox, just try it your selves.
\n
item 2
\n
item 3
\n
item 4
\n
\n
\n
\n
\n        \n  dragularService([$element.children()[0].children(), {\n    boundingBox: $element.children()[0],\n    lockX: true\n  });\n        \n      
\n
'),e.put("exampleBoundingBoxLockY/exampleBoundingBoxLockY.html","
\n

BoundingBox and LockY

\n \n
\n
\n
\n
Items are locked in Y axis movement and cannot cross its closest parent div.boundingBox, just try it your selves.
\n
item 2
\n
item 3
\n
item 4
\n
item 5
\n
item 6
\n
\n
\n
\n
\n        \n  dragularService([$element.children()[0].children(), {\n    boundingBox: $element.children()[0],\n    lockY: true\n  });\n        \n      
\n
"),e.put("exampleCopy/exampleCopy.html","
\n

Copy

\n \n
\n
\n
Move me, and make copy on drop.
\n
If you try to drop me somewhere other than these containers, I'll just come back.
\n
\n
\n
You can drop me in the left container, otherwise I'll stay here.
\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"),e.put("exampleCopyWithModel/exampleCopyWithModel.html","
\n

Copy - with model

\n \n
\n
\n
\n
{{item.content}}
\n
\n
\n
{{item.content}}
\n
\n
\n
\n
\n
Items1:\n
\n            {{ items1 | json }}\n          
\n
\n
\n
\n
Items2:\n
\n            {{ items2 | json }}\n          
\n
\n
\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"),e.put("exampleCustomClasses/exampleCustomClasses.html","
\n

Custom classes

\n \n
\n
\n
Move me, but you can only drop me in one of these containers.
\n
If you try to drop me somewhere other than these containers, I'll just come back.
\n
Item 3.
\n
Item 6.
\n
\n
\n
You can drop me in the left container, otherwise I'll stay here.
\n
Item 4.
\n
Item 5.
\n
\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      
\n
\n"),e.put("exampleDifferentOptionsWithModel/exampleDifferentOptionsWithModel.html","
\n

Different options - with model

\n \n
\n
\n
\n
{{item.content}}
\n
\n
\n
{{item.content}}
\n
\n
\n
\n
\n
Items1:\n          
{{items1 | json}}
\n
\n
\n
Items2:\n          
{{items2 | json}}
\n
\n
\n
\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"),e.put("exampleDirective/exampleDirective.html","
\n

Directive

\n \n
\n
\n
Move me, but you can only drop me in one of these containers.
\n
If you try to drop me somewhere other than these containers, I'll just come back.
\n
Item 3.
\n
Item 6.
\n
\n
\n
You can drop me in the left container, otherwise I'll stay here.
\n
Item 4.
\n
Item 5.
\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"),e.put("exampleDirectiveWithModel/exampleDirectiveWithModel.html","
\n

Directive - with model

\n \n
\n
\n
\n
{{item.content}}
\n
\n
\n
{{item.content}}
\n
\n
\n
\n
\n
Items1:\n
{{items1 | json}}
\n
\n
\n
Items2:\n
{{items2 | json}}
\n
\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      
\n
\n"),e.put("exampleDragOverEvents/exampleDragOverEvents.html","
\n

Drag-over events

\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\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
dragularService.shared.itemitem beeing dragged (it is copy of item if copy is enabled via options)
dragularService.shared.sourcesource container item is dragged from
dragularService.shared.sourceModelsource container model representation if model was porvided
dragularService.shared.initialIndexoriginal index of item, can be used to get item model from sourceModel
dragularService.shared.extracontains accepting information (boolean) on dragenter, element drag is leaving to on dragleave and element behind the cursor on dragrelease
\n
\n\n

Try to drag over the not-container too.

\n
\n
\n
apples and oranges cannot be mixed
\n
apple 2
\n
apple 3
\n
apple 4
\n
\n
\n
orange 1
\n
orange 2
\n
orange 3
\n
orange 4
\n
\n
\n
apple 5
\n
apple 6
\n
apple 7
\n
apple 8
\n
\n
\n
orange 5
\n
orange 6
\n
orange 7
\n
orange 8
\n
\n
\n
Test active class on NOT container.
\n\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  
\n
\n"),e.put("exampleEvents/exampleEvents.html","
\n

Events

\n \n
\n
\n
Move me, but you can only drop me in one of these containers.
\n
If you try to drop me somewhere other than these containers, I'll just come back.
\n
Item 3.
\n
Item 6.
\n
\n
\n
You can drop me in the left container, otherwise I'll stay here.
\n
Item 4.
\n
Item 5.
\n
\n
\n
\n        \n.controller('Events', ['$scope', '$element', 'dragularService', '$timeout', function TodoCtrl($scope, $element, dragularService, $timeout) {\n    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'));\n    $scope.$on('dragulardrag', myFn('drag'));\n    $scope.$on('dragularcancel', myFn('cancel'));\n    $scope.$on('dragulardrop', myFn('drop'));\n    $scope.$on('dragularremove', myFn('remove'));\n    $scope.$on('dragulardragend', myFn('dragend'));\n    $scope.$on('dragularshadow', myFn('shadow'));\n\n    function myFn(eventName) {\n      return function() {\n        console.log(eventName, arguments);\n      };\n    }\n\n  }]);\n        \n      
\n
\n"),e.put("exampleHandle/exampleHandle.html","
\n

Handle

\n \n
\n
\n
+Move me, but you can use the plus sign to drag me around.
\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      
\n
\n"),e.put("exampleIsContainerWithModel/exampleIsContainerWithModel.html","
\n

isContainer - with model

\n \n
\n
\n
\n
{{item.content}}
\n
\n
\n
{{item.content}}\n
\n
\n
\n
\n
\n
Items1:\n          
{{items1 | json}}
\n
\n
\n
Cart:\n          
{{cartModel | json}}
\n
\n
\n
\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
\n"), +e.put("exampleNameSpaces/exampleNameSpaces.html","
\n

NameSpaces

\n \n
\n
\n
try to mix oranges and apples
\n
apple 2
\n
apple 3
\n
apple 4
\n
\n
\n
orange 1
\n
orange 2
\n
orange 3
\n
orange 4
\n
\n
\n
apple 5
\n
apple 6
\n
apple 7
\n
apple 8
\n
\n
\n
mixed 1
\n
mixed 2
\n
mixed 3
\n
mixed 4
\n
\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
"),e.put("exampleNestedNgRepeat/exampleNestedNgRepeat.html","
\n

Nested ngRepeat

\n \n
\n
\n
Row {{$index}}
\n
{{item.content}}
\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"),e.put("exampleNestedNgRepeatWithModel/exampleNestedNgRepeatWithModel.html","
\n

Nested ngRepeat - with model

\n \n
\n
\n
\n
\n
Row {{::$index}}
\n
\n
{{item.content}}
\n
\n
\n
\n
\n
\n
\n
\n            
Items:\n
{{items | json}}
\n
\n
\n
\n
\n
\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"),e.put("exampleNgRepeat/exampleNgRepeat.html","
\n

ngRepeat

\n \n
\n
\n
\n {{item.content}}\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
\n"),e.put("exampleNgRepeatFilteredWithModel/exampleNgRepeatFilteredWithModel.html","
\n

Filtered ngRepeat - with model

\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!

\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n
{{item.content}}
\n
\n
\n
{{item.content}}
\n
\n
\n
\n
\n
Items1:\n          
{{items1 | json}}
\n
\n
\n
Items2:\n          
{{items2 | json}}
\n
\n
\n
\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"),e.put("exampleNgRepeatWithModel/exampleNgRepeatWithModel.html","
\n

ngRepeat - with model

\n \n
\n
\n
\n
\n {{item.content}}\n \n \n
\n
\n
\n
\n
\n
Items:\n
{{items | json}}
\n
\n
\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"),e.put("exampleRemoveOnSpill/exampleRemoveOnSpill.html","
\n

Remove on spill

\n \n
\n
\n
Move me, but you can only drop me in containers.
\n
If you try to drop me somewhere other than containers, I'll die a fiery death.
\n
Item 3.
\n
Item 6.
\n
Item 4.
\n
Item 5.
\n
\n \n
\n
\n        \n  dragularService([document.getElementById(single)], { removeOnSpill: true });\n        \n      
\n
"),e.put("exampleRemoveOnSpillWithModel/exampleRemoveOnSpillWithModel.html","
\n

Remove on spill - with model

\n \n
\n
\n
\n
{{item.content}}
\n
\n
\n
{{item.content}}
\n
\n
\n
\n
\n
Items1:\n          
{{items1 | json}}
\n
\n
\n
Items2:\n          
{{items2 | json}}
\n
\n
\n
\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"),e.put("exampleRevertOnSpill/exampleRevertOnSpill.html","
\n

Revert on spill

\n \n
\n
\n
Move me, but you can only drop me in one of these containers.
\n
If you try to drop me somewhere other than these containers, I'll just come back.
\n
Item 3.
\n
Item 6.
\n
\n
\n
You can drop me in the left container, otherwise I'll stay here.
\n
Item 4.
\n
Item 5.
\n
\n
\n
\n        \n  dragularService([document.getElementById(left), document.getElementById(right)], { revertOnSpill: true });\n        \n      
\n
"),e.put("exampleScrollingDrag/exampleScrollingDrag.html",'
\n

Scrolling drag

\n \n
\n
\n
up
\n
\n
Item 1.
\n
Item 2.
\n
Item 3.
\n
Item 4.
\n
Item 5.
\n
Item 6.
\n
Item 7.
\n
Item 9.
\n
Item 10.
\n
Item 11.
\n
Item 12.
\n
Item 13.
\n
\n
down
\n
\n
\n
\n
\n
Item 1.
\n
Item 2.
\n
Item 3.
\n
Item 4.
\n
Item 5.
\n
Item 6.
\n
Item 7.
\n
Item 9.
\n
Item 10.
\n
Item 11.
\n
Item 12.
\n
Item 13.
\n
\n
\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'),e.put("partials/partial-contribute.html",'
\n
\n
\n \n
\n
\n
\n'),e.put("partials/partial-docs.html",'
\n
\n \n \n
\n

\n \n

\n \n
\n
\n \n
\n \n
\n'),e.put("partials/partial-home.html",'
\n
\n \n
\n
\n

DRAGULAR

\n

Angular drag&drop based on dragula.

\n

Live examples in docs

\n
\n
\n
\n

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

\n

Inspiration

\n

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

\n

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

\n

Differences of dragular (against dragula)

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

Todo

\n
    \n
  • improve docs
  • \n
\n

Features

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

For installation, usage and examples go to docs

\n
\n
\n \n
\n \n
\n \n
\n'),e.put("partials/autogenerated/contribute.html",'

How to contribute

\n

It'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.

\n

Before contributing, please read the code of conduct.

\n

Reporting issues

\n

GitHub 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:

\n

1. 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.

\n

2. Not sure if it's a bug?. Then please ask via issues and tag it [question].

\n

3. 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.

\n

4. 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)

\n

5. 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.

\n

Dev vs. Master

\n

The 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.

\n

Making Changes

\n

To take advantage of our npm build script and jshint config it will be easiest for you if you have node.js installed locally.

\n

You can download node.js from nodejs.org.

\n

After 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.

\n

Developing

\n

There are several gulp tasks that are used for generating different builds:

\n
    \n
  • gulp dev - Serves files with BrowserSync server, watches & automatically refreshes connected browsers on changes, generates non-minified but concatenated styles & scripts from the dragular source.
  • \n
  • gulp dev:docs - Does exactly the same as gulp dev, except it works with the documentation source.
  • \n
  • gulp build - Concatenates and minifies dragular source files.
  • \n
  • gulp build:docs - Concatenates and minifies documentation source files.
  • \n
\n

Linting

\n
    \n
  • gulp lint & gulp lint:docs - Lint JavaScript files.
  • \n
\n

Making a pull request

\n

Once that is ready, make your changes and submit a Pull Request:

\n
    \n
  • Send 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.

    \n
  • \n
  • Ensure changes are jshint validated. Our JSHint configuration file is provided in the repository and you should check against it before submitting.

    \n
  • \n
  • Only 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.

    \n
  • \n
\n

Dependencies for building from source and running tests:

\n

Coding style preferences are not contributions

\n

If 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.

\n

I don't really like git / node.js, but I can fix this bug

\n

That 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 774b9b1e..43a4cf39 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","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","angular","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","len","getContainers","shLen","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","cloneNode","$emit","dragularcloned","containerIndex","indexOf","domIndexOf","dragulardrag","manualStart","rect","getBoundingClientRect","width","height","getRectWidth","getRectHeight","mirrorContainer","appendChild","body","unselectable","scrollContainer","drop","ungrab","moved","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","compileItemOnDrop","$applyAsync","content","dragulardrop","dropIndex","splice","dropElmModel","dontCopyModel","dragularremove","removeMirrorImage","dragularout","dragulardragend","destroy","removeContainers","all","changes","makeArray","index","before","scrollTop","deltaY","stopPropagation","depSanitize","getBool","dragularover","never","getEmptyObject","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","classList","contains","cartModel","removeItem","items","parentContainers","nestedContainers","push","addItem","$filter","filter1query","filter2query","filteredModel1","filteredModel2","getFilteredModel","filteredModel","filterQuery","$interval","bar","inc","speed","leftScrollContainer","rightScrollContainer","leftTopBar","leftBottomBar","rightTopBar","rightBottomBar","run","$templateCache","put"],"mappings":"CAAA,SAA2CA,EAAMC,GAChD,GAAsB,gBAAZC,UAA0C,gBAAXC,QACxCA,OAAOD,QAAUD,QACb,IAAqB,kBAAXG,SAAyBA,OAAOC,IAC9CD,UAAWH,OACP,CAC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pF,EAAOD,QAAU2C,GAKZ,SAAS1C,EAAQD,GAEtB,YAAcC,GAAOD,QAAU4C,QAAQ3C,OAAO,gBAAiB2b,KAAK,iBAAkB,SAASC,GAAiBA,EAAeC,IAAI,+BAA+B,2sBAClKD,EAAeC,IAAI,iCAAiC,s7DACpDD,EAAeC,IAAI,mDAAmD,+9EACtED,EAAeC,IAAI,6CAA6C,08BAChED,EAAeC,IAAI,uDAAuD,2/BAC1ED,EAAeC,IAAI,uDAAuD,ihCAC1ED,EAAeC,IAAI,+BAA+B,m2CAClDD,EAAeC,IAAI,iDAAiD,k9EACpED,EAAeC,IAAI,iDAAiD,svCACpED,EAAeC,IAAI,yEAAyE,wtGAC5FD,EAAeC,IAAI,yCAAyC,67DAC5DD,EAAeC,IAAI,2DAA2D,4xEAC9ED,EAAeC,IAAI,mDAAmD,o3JACtED,EAAeC,IAAI,mCAAmC,2vDACtDD,EAAeC,IAAI,mCAAmC,6pBACtDD,EAAeC,IAAI,+DAA+D;AAClFD,EAAeC,IAAI,2CAA2C,gjEAC9DD,EAAeC,IAAI,mDAAmD,+wFACtED,EAAeC,IAAI,qEAAqE,85HACxFD,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,kMACtDD,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\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\t__webpack_require__(30);\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', [dragular, 'templates', 'ui.router'])\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)\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('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\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.2 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\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: getEmptyObject, // 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\t\t\t\tif ( !_isArray( o.nameSpace ) ) {\n\t\t\t\t\to.nameSpace = [ o.nameSpace ];\n\t\t\t\t}\n\t\t\t\to.nameSpace.forEach( function eachNameSpace( nameSpace ) {\n\t\t\t\t\tif ( !shared.containers[ nameSpace ] ) {\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\t\t\t\t\tvar len = getContainers( o ).length,\n\t\t\t\t\t\tshLen = shared.containers[ nameSpace ].length;\n\t\t\t\t\tfor ( var i = 0; i < len; i++ ) {\n\t\t\t\t\t\tshared.containers[ nameSpace ][ i + shLen ] = getContainers( o )[ i ];\n\t\t\t\t\t\tshared.containersCtx[ nameSpace ][ i + shLen ] = {\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\tconsole.log( 'usecase?' );\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\tshared.item = context.item.cloneNode( true );\n\t\t\t\t\tshared.copy = true;\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\to.scope.$emit( o.eventNames[ 'dragular' + type ], shared.item, shared.lastDropTarget, shared.source, e );\n\t\t\t\t\t}\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}\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\t\t\t\tshared.targetCtx = targetCtx || {};\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.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\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\tif ( isInitialPlacement( target ) ) {\n\t\t\t\t\t\t\to.scope.$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\to.scope.$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\n\t\t\t\t\tif ( !o.compileItemOnDrop ) {\n\t\t\t\t\t\tcleanup();\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 getEmptyObject() {\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 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'));\n\t $scope.$on('dragulardrag', myFn('drag'));\n\t $scope.$on('dragularcancel', myFn('cancel'));\n\t $scope.$on('dragulardrop', myFn('drop'));\n\t $scope.$on('dragularremove', myFn('remove'));\n\t $scope.$on('dragulardragend', myFn('dragend'));\n\t $scope.$on('dragularshadow', myFn('shadow'));\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\n\tmodule.exports = EventsCtrl;\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'use strict'; module.exports = angular.module(\"templates\", []).run([\"$templateCache\", function($templateCache) {$templateCache.put(\"docsInstall/docsInstall.html\",\"

Install

\\n

download dragular.js and dragular.css from dist folder

\\n

OR clone git

\\n
\\ngit clone http://github.com/luckylooke/dragular.git\\n
\\n

OR use npm

\\n
\\n[sudo] npm install dragular\\n
\\n

OR use bower

\\n
\\nbower install dragular\\n
\\n

AND 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
\\n

AND put dragularModule into dependency array

\\n
\\nvar app = angular.module(\\'myApp\\', [\\'dragularModule\\', \\'otherDependencies\\']);\\n
\\n

DONE :)

\\n\");\n\t$templateCache.put(\"exampleBasic/exampleBasic.html\",\"
\\n

Basic

\\n \\n
\\n
\\n
Move me, but you can only drop me in one of these containers.
\\n
If you try to drop me somewhere other than these containers, I\\'ll just come back.
\\n
Item 3.
\\n
Item 6.
\\n
\\n
\\n
You can drop me in the left container, otherwise I\\'ll stay here.
\\n
Try to click me, dragular distinguish drag from click
\\n
Item 5.
\\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      
\\n
\\n\");\n\t$templateCache.put(\"exampleBasicWithModel/exampleBasicWithModel.html\",\"
\\n

Basic - with model

\\n \\n
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
\\n
\\n
Items1:\\n          
{{items1 | json}}
\\n
\\n
\\n
Items2:\\n          
{{items2 | json}}
\\n
\\n
\\n
\\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\");\n\t$templateCache.put(\"exampleBoundingBox/exampleBoundingBox.html\",\"
\\n

BoundingBox

\\n \\n
\\n
\\n
This items cannot cross its example element, just try it your selves.
\\n
Item 2.
\\n
Item 3.
\\n
Item 6.
\\n
\\n
\\n
This items cannot cross its example element, just try it your selves.
\\n
Item 4.
\\n
Item 5.
\\n
\\n
\\n
\\n        \\n  dragularService([$element.children(), {\\n    boundingBox: $element\\n  });\\n        \\n      
\\n
\");\n\t$templateCache.put(\"exampleBoundingBoxLockX/exampleBoundingBoxLockX.html\",\"
\\n

BoundingBox and lockX

\\n \\n
\\n
\\n
\\n
Items are locked in X axis movement and cannot cross its closest parent div.boundingBox, just try it your selves.
\\n
item 2
\\n
item 3
\\n
item 4
\\n
\\n
\\n
\\n
\\n        \\n  dragularService([$element.children()[0].children(), {\\n    boundingBox: $element.children()[0],\\n    lockX: true\\n  });\\n        \\n      
\\n
\");\n\t$templateCache.put(\"exampleBoundingBoxLockY/exampleBoundingBoxLockY.html\",\"
\\n

BoundingBox and LockY

\\n \\n
\\n
\\n
\\n
Items are locked in Y axis movement and cannot cross its closest parent div.boundingBox, just try it your selves.
\\n
item 2
\\n
item 3
\\n
item 4
\\n
item 5
\\n
item 6
\\n
\\n
\\n
\\n
\\n        \\n  dragularService([$element.children()[0].children(), {\\n    boundingBox: $element.children()[0],\\n    lockY: true\\n  });\\n        \\n      
\\n
\");\n\t$templateCache.put(\"exampleCopy/exampleCopy.html\",\"
\\n

Copy

\\n \\n
\\n
\\n
Move me, and make copy on drop.
\\n
If you try to drop me somewhere other than these containers, I\\'ll just come back.
\\n
\\n
\\n
You can drop me in the left container, otherwise I\\'ll stay here.
\\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\t$templateCache.put(\"exampleCopyWithModel/exampleCopyWithModel.html\",\"
\\n

Copy - with model

\\n \\n
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
\\n
\\n
Items1:\\n
\\n            {{ items1 | json }}\\n          
\\n
\\n
\\n
\\n
Items2:\\n
\\n            {{ items2 | json }}\\n          
\\n
\\n
\\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\");\n\t$templateCache.put(\"exampleCustomClasses/exampleCustomClasses.html\",\"
\\n

Custom classes

\\n \\n
\\n
\\n
Move me, but you can only drop me in one of these containers.
\\n
If you try to drop me somewhere other than these containers, I\\'ll just come back.
\\n
Item 3.
\\n
Item 6.
\\n
\\n
\\n
You can drop me in the left container, otherwise I\\'ll stay here.
\\n
Item 4.
\\n
Item 5.
\\n
\\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      
\\n
\\n\");\n\t$templateCache.put(\"exampleDifferentOptionsWithModel/exampleDifferentOptionsWithModel.html\",\"
\\n

Different options - with model

\\n \\n
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
\\n
\\n
Items1:\\n          
{{items1 | json}}
\\n
\\n
\\n
Items2:\\n          
{{items2 | json}}
\\n
\\n
\\n
\\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\t$templateCache.put(\"exampleDirective/exampleDirective.html\",\"
\\n

Directive

\\n \\n
\\n
\\n
Move me, but you can only drop me in one of these containers.
\\n
If you try to drop me somewhere other than these containers, I\\'ll just come back.
\\n
Item 3.
\\n
Item 6.
\\n
\\n
\\n
You can drop me in the left container, otherwise I\\'ll stay here.
\\n
Item 4.
\\n
Item 5.
\\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\t$templateCache.put(\"exampleDirectiveWithModel/exampleDirectiveWithModel.html\",\"
\\n

Directive - with model

\\n \\n
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
\\n
\\n
Items1:\\n
{{items1 | json}}
\\n
\\n
\\n
Items2:\\n
{{items2 | json}}
\\n
\\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      
\\n
\\n\");\n\t$templateCache.put(\"exampleDragOverEvents/exampleDragOverEvents.html\",\"
\\n

Drag-over events

\\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\\n
\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
dragularService.shared.itemitem beeing dragged (it is copy of item if copy is enabled via options)
dragularService.shared.sourcesource container item is dragged from
dragularService.shared.sourceModelsource container model representation if model was porvided
dragularService.shared.initialIndexoriginal index of item, can be used to get item model from sourceModel
dragularService.shared.extracontains accepting information (boolean) on dragenter, element drag is leaving to on dragleave and element behind the cursor on dragrelease
\\n
\\n\\n

Try to drag over the not-container too.

\\n
\\n
\\n
apples and oranges cannot be mixed
\\n
apple 2
\\n
apple 3
\\n
apple 4
\\n
\\n
\\n
orange 1
\\n
orange 2
\\n
orange 3
\\n
orange 4
\\n
\\n
\\n
apple 5
\\n
apple 6
\\n
apple 7
\\n
apple 8
\\n
\\n
\\n
orange 5
\\n
orange 6
\\n
orange 7
\\n
orange 8
\\n
\\n
\\n
Test active class on NOT container.
\\n\\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  
\\n
\\n\");\n\t$templateCache.put(\"exampleEvents/exampleEvents.html\",\"
\\n

Events

\\n \\n
\\n
\\n
Move me, but you can only drop me in one of these containers.
\\n
If you try to drop me somewhere other than these containers, I\\'ll just come back.
\\n
Item 3.
\\n
Item 6.
\\n
\\n
\\n
You can drop me in the left container, otherwise I\\'ll stay here.
\\n
Item 4.
\\n
Item 5.
\\n
\\n
\\n
\\n        \\n.controller(\\'Events\\', [\\'$scope\\', \\'$element\\', \\'dragularService\\', \\'$timeout\\', function TodoCtrl($scope, $element, dragularService, $timeout) {\\n    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\\'));\\n    $scope.$on(\\'dragulardrag\\', myFn(\\'drag\\'));\\n    $scope.$on(\\'dragularcancel\\', myFn(\\'cancel\\'));\\n    $scope.$on(\\'dragulardrop\\', myFn(\\'drop\\'));\\n    $scope.$on(\\'dragularremove\\', myFn(\\'remove\\'));\\n    $scope.$on(\\'dragulardragend\\', myFn(\\'dragend\\'));\\n    $scope.$on(\\'dragularshadow\\', myFn(\\'shadow\\'));\\n\\n    function myFn(eventName) {\\n      return function() {\\n        console.log(eventName, arguments);\\n      };\\n    }\\n\\n  }]);\\n        \\n      
\\n
\\n\");\n\t$templateCache.put(\"exampleHandle/exampleHandle.html\",\"
\\n

Handle

\\n \\n
\\n
\\n
+Move me, but you can use the plus sign to drag me around.
\\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      
\\n
\\n\");\n\t$templateCache.put(\"exampleIsContainerWithModel/exampleIsContainerWithModel.html\",\"
\\n

isContainer - with model

\\n \\n
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
{{item.content}}\\n
\\n
\\n
\\n
\\n
\\n
Items1:\\n          
{{items1 | json}}
\\n
\\n
\\n
Cart:\\n          
{{cartModel | json}}
\\n
\\n
\\n
\\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
\\n\");\n\t$templateCache.put(\"exampleNameSpaces/exampleNameSpaces.html\",\"
\\n

NameSpaces

\\n \\n
\\n
\\n
try to mix oranges and apples
\\n
apple 2
\\n
apple 3
\\n
apple 4
\\n
\\n
\\n
orange 1
\\n
orange 2
\\n
orange 3
\\n
orange 4
\\n
\\n
\\n
apple 5
\\n
apple 6
\\n
apple 7
\\n
apple 8
\\n
\\n
\\n
mixed 1
\\n
mixed 2
\\n
mixed 3
\\n
mixed 4
\\n
\\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\t$templateCache.put(\"exampleNestedNgRepeat/exampleNestedNgRepeat.html\",\"
\\n

Nested ngRepeat

\\n \\n
\\n
\\n
Row {{$index}}
\\n
{{item.content}}
\\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\");\n\t$templateCache.put(\"exampleNestedNgRepeatWithModel/exampleNestedNgRepeatWithModel.html\",\"
\\n

Nested ngRepeat - with model

\\n \\n
\\n
\\n
\\n
\\n
Row {{::$index}}
\\n
\\n
{{item.content}}
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n            
Items:\\n
{{items | json}}
\\n
\\n
\\n
\\n
\\n
\\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\t$templateCache.put(\"exampleNgRepeat/exampleNgRepeat.html\",\"
\\n

ngRepeat

\\n \\n
\\n
\\n
\\n {{item.content}}\\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
\\n\");\n\t$templateCache.put(\"exampleNgRepeatFilteredWithModel/exampleNgRepeatFilteredWithModel.html\",\"
\\n

Filtered ngRepeat - with model

\\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!

\\n
\\n
\\n
\\n \\n
\\n
\\n \\n
\\n
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
\\n
\\n
Items1:\\n          
{{items1 | json}}
\\n
\\n
\\n
Items2:\\n          
{{items2 | json}}
\\n
\\n
\\n
\\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\");\n\t$templateCache.put(\"exampleNgRepeatWithModel/exampleNgRepeatWithModel.html\",\"
\\n

ngRepeat - with model

\\n \\n
\\n
\\n
\\n
\\n {{item.content}}\\n \\n \\n
\\n
\\n
\\n
\\n
\\n
Items:\\n
{{items | json}}
\\n
\\n
\\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\t$templateCache.put(\"exampleRemoveOnSpill/exampleRemoveOnSpill.html\",\"
\\n

Remove on spill

\\n \\n
\\n
\\n
Move me, but you can only drop me in containers.
\\n
If you try to drop me somewhere other than containers, I\\'ll die a fiery death.
\\n
Item 3.
\\n
Item 6.
\\n
Item 4.
\\n
Item 5.
\\n
\\n
\\n
You can drop me in the left container.
\\n
Item 4.
\\n
Item 5.
\\n
\\n
\\n
\\n        \\n  dragularService([document.getElementById(single)], { removeOnSpill: true });\\n        \\n      
\\n
\");\n\t$templateCache.put(\"exampleRemoveOnSpillWithModel/exampleRemoveOnSpillWithModel.html\",\"
\\n

Remove on spill - with model

\\n \\n
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
\\n
\\n
Items1:\\n          
{{items1 | json}}
\\n
\\n
\\n
Items2:\\n          
{{items2 | json}}
\\n
\\n
\\n
\\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\");\n\t$templateCache.put(\"exampleRevertOnSpill/exampleRevertOnSpill.html\",\"
\\n

Revert on spill

\\n \\n
\\n
\\n
Move me, but you can only drop me in one of these containers.
\\n
If you try to drop me somewhere other than these containers, I\\'ll just come back.
\\n
Item 3.
\\n
Item 6.
\\n
\\n
\\n
You can drop me in the left container, otherwise I\\'ll stay here.
\\n
Item 4.
\\n
Item 5.
\\n
\\n
\\n
\\n        \\n  dragularService([document.getElementById(left), document.getElementById(right)], { revertOnSpill: true });\\n        \\n      
\\n
\");\n\t$templateCache.put(\"exampleScrollingDrag/exampleScrollingDrag.html\",\"
\\n

Scrolling drag

\\n \\n
\\n
\\n
up
\\n
\\n
Item 1.
\\n
Item 2.
\\n
Item 3.
\\n
Item 4.
\\n
Item 5.
\\n
Item 6.
\\n
Item 7.
\\n
Item 9.
\\n
Item 10.
\\n
Item 11.
\\n
Item 12.
\\n
Item 13.
\\n
\\n
down
\\n
\\n
\\n
\\n
\\n
Item 1.
\\n
Item 2.
\\n
Item 3.
\\n
Item 4.
\\n
Item 5.
\\n
Item 6.
\\n
Item 7.
\\n
Item 9.
\\n
Item 10.
\\n
Item 11.
\\n
Item 12.
\\n
Item 13.
\\n
\\n
\\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\t$templateCache.put(\"partials/partial-contribute.html\",\"
\\n
\\n
\\n \\n
\\n
\\n
\\n\");\n\t$templateCache.put(\"partials/partial-docs.html\",\"
\\n
\\n
\\n \\n
\\n \\n
\\n

\\n \\n

\\n \\n
\\n
\\n \\n
\\n \\n
\\n\");\n\t$templateCache.put(\"partials/partial-home.html\",\"
\\n
\\n \\n
\\n
\\n

DRAGULAR

\\n

Angular drag&drop based on dragula.

\\n

Live examples in docs

\\n
\\n
\\n
\\n

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

\\n

Inspiration

\\n

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

\\n

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

\\n

Differences of dragular (against dragula)

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

Todo

\\n
    \\n
  • improve docs
  • \\n
\\n

Features

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

For installation, usage and examples go to docs

\\n
\\n
\\n \\n
\\n \\n
\\n \\n
\\n\");\n\t$templateCache.put(\"partials/autogenerated/contribute.html\",\"

How to contribute

\\n

It'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.

\\n

Before contributing, please read the code of conduct.

\\n

Reporting issues

\\n

GitHub 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:

\\n

1. 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.

\\n

2. Not sure if it's a bug?. Then please ask via issues and tag it [question].

\\n

3. 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.

\\n

4. Include a live example. After narrowing your code down to only the problem areas, make use of jsFiddle, 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 fiddle)

\\n

5. 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.

\\n

Dev vs. Master

\\n

The 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.

\\n

Making Changes

\\n

To take advantage of our npm build script and jshint config it will be easiest for you if you have node.js installed locally.

\\n

You can download node.js from nodejs.org.

\\n

After 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.

\\n

Developing

\\n

There are several gulp tasks that are used for generating different builds:

\\n
    \\n
  • gulp dev - Serves files with BrowserSync server, watches & automatically refreshes connected browsers on changes, generates non-minified but concatenated styles & scripts from the dragular source.
  • \\n
  • gulp dev:docs - Does exactly the same as gulp dev, except it works with the documentation source.
  • \\n
  • gulp build - Concatenates and minifies dragular source files.
  • \\n
  • gulp build:docs - Concatenates and minifies documentation source files.
  • \\n
\\n

Linting

\\n
    \\n
  • gulp lint & gulp lint:docs - Lint JavaScript files.
  • \\n
\\n

Making a pull request

\\n

Once that is ready, make your changes and submit a Pull Request:

\\n
    \\n
  • Send 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.

    \\n
  • \\n
  • Ensure changes are jshint validated. Our JSHint configuration file is provided in the repository and you should check against it before submitting.

    \\n
  • \\n
  • Only 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.

    \\n
  • \\n
\\n

Dependencies for building from source and running tests:

\\n

Coding style preferences are not contributions

\\n

If 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.

\\n

I don't really like git / node.js, but I can fix this bug

\\n

That 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","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","angular","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","len","getContainers","shLen","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","cloneNode","$emit","dragularcloned","containerIndex","indexOf","domIndexOf","dragulardrag","manualStart","rect","getBoundingClientRect","width","height","getRectWidth","getRectHeight","mirrorContainer","appendChild","body","unselectable","scrollContainer","drop","ungrab","moved","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","compileItemOnDrop","$applyAsync","content","dragulardrop","dropIndex","splice","dropElmModel","dontCopyModel","dragularremove","removeMirrorImage","dragularout","dragulardragend","destroy","removeContainers","all","changes","makeArray","index","before","scrollTop","deltaY","stopPropagation","depSanitize","getBool","dragularover","never","getEmptyObject","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","classList","contains","cartModel","removeItem","items","parentContainers","nestedContainers","push","addItem","$filter","filter1query","filter2query","filteredModel1","filteredModel2","getFilteredModel","filteredModel","filterQuery","$interval","bar","inc","speed","leftScrollContainer","rightScrollContainer","leftTopBar","leftBottomBar","rightTopBar","rightBottomBar","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,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AI,+BAA+B,m2CAClDD,EAAeC,IAAI,iDAAiD,k9EACpED,EAAeC,IAAI,iDAAiD,svCACpED,EAAeC,IAAI,yEAAyE,wtGAC5FD,EAAeC,IAAI,yCAAyC,67DAC5DD,EAAeC,IAAI,2DAA2D,4xEAC9ED,EAAeC,IAAI,mDAAmD,o3JACtED,EAAeC,IAAI,mCAAmC,2vDACtDD,EAAeC,IAAI,mCAAmC,6pBACtDD,EAAeC,IAAI,+DAA+D;AAClFD,EAAeC,IAAI,2CAA2C,gjEAC9DD,EAAeC,IAAI,mDAAmD,+wFACtED,EAAeC,IAAI,qEAAqE,85HACxFD,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,kMACtDD,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\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\t__webpack_require__(30);\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', [dragular, 'templates', 'ui.router'])\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)\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('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\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.2 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\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: getEmptyObject, // 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\t\t\t\tif ( !_isArray( o.nameSpace ) ) {\n\t\t\t\t\to.nameSpace = [ o.nameSpace ];\n\t\t\t\t}\n\t\t\t\to.nameSpace.forEach( function eachNameSpace( nameSpace ) {\n\t\t\t\t\tif ( !shared.containers[ nameSpace ] ) {\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\t\t\t\t\tvar len = getContainers( o ).length,\n\t\t\t\t\t\tshLen = shared.containers[ nameSpace ].length;\n\t\t\t\t\tfor ( var i = 0; i < len; i++ ) {\n\t\t\t\t\t\tshared.containers[ nameSpace ][ i + shLen ] = getContainers( o )[ i ];\n\t\t\t\t\t\tshared.containersCtx[ nameSpace ][ i + shLen ] = {\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\tconsole.log( 'usecase?' );\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\tshared.item = context.item.cloneNode( true );\n\t\t\t\t\tshared.copy = true;\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\to.scope.$emit( o.eventNames[ 'dragular' + type ], shared.item, shared.lastDropTarget, shared.source, e );\n\t\t\t\t\t}\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}\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\tif ( 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.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\tconsole.log('release');\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\tif ( isInitialPlacement( target ) ) {\n\t\t\t\t\t\t\to.scope.$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\to.scope.$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\n\t\t\t\t\tif ( !o.compileItemOnDrop ) {\n\t\t\t\t\t\tcleanup();\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 getEmptyObject() {\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 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'));\n\t $scope.$on('dragulardrag', myFn('drag'));\n\t $scope.$on('dragularcancel', myFn('cancel'));\n\t $scope.$on('dragulardrop', myFn('drop'));\n\t $scope.$on('dragularremove', myFn('remove'));\n\t $scope.$on('dragulardragend', myFn('dragend'));\n\t $scope.$on('dragularshadow', myFn('shadow'));\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\n\tmodule.exports = EventsCtrl;\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'use strict'; module.exports = angular.module(\"templates\", []).run([\"$templateCache\", function($templateCache) {$templateCache.put(\"docsInstall/docsInstall.html\",\"

Install

\\n

download dragular.js and dragular.css from dist folder

\\n

OR clone git

\\n
\\ngit clone http://github.com/luckylooke/dragular.git\\n
\\n

OR use npm

\\n
\\n[sudo] npm install dragular\\n
\\n

OR use bower

\\n
\\nbower install dragular\\n
\\n

AND 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
\\n

AND put dragularModule into dependency array

\\n
\\nvar app = angular.module(\\'myApp\\', [\\'dragularModule\\', \\'otherDependencies\\']);\\n
\\n

DONE :)

\\n\");\n\t$templateCache.put(\"exampleBasicWithModel/exampleBasicWithModel.html\",\"
\\n

Basic - with model

\\n \\n
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
\\n
\\n
Items1:\\n          
{{items1 | json}}
\\n
\\n
\\n
Items2:\\n          
{{items2 | json}}
\\n
\\n
\\n
\\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\");\n\t$templateCache.put(\"exampleBasic/exampleBasic.html\",\"
\\n

Basic

\\n \\n
\\n
\\n
Move me, but you can only drop me in one of these containers.
\\n
If you try to drop me somewhere other than these containers, I\\'ll just come back.
\\n
Item 3.
\\n
Item 6.
\\n
\\n
\\n
You can drop me in the left container, otherwise I\\'ll stay here.
\\n
Try to click me, dragular distinguish drag from click
\\n
Item 5.
\\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      
\\n
\\n\");\n\t$templateCache.put(\"exampleBoundingBox/exampleBoundingBox.html\",\"
\\n

BoundingBox

\\n \\n
\\n
\\n
This items cannot cross its example element, just try it your selves.
\\n
Item 2.
\\n
Item 3.
\\n
Item 6.
\\n
\\n
\\n
This items cannot cross its example element, just try it your selves.
\\n
Item 4.
\\n
Item 5.
\\n
\\n
\\n
\\n        \\n  dragularService([$element.children(), {\\n    boundingBox: $element\\n  });\\n        \\n      
\\n
\");\n\t$templateCache.put(\"exampleBoundingBoxLockX/exampleBoundingBoxLockX.html\",\"
\\n

BoundingBox and lockX

\\n \\n
\\n
\\n
\\n
Items are locked in X axis movement and cannot cross its closest parent div.boundingBox, just try it your selves.
\\n
item 2
\\n
item 3
\\n
item 4
\\n
\\n
\\n
\\n
\\n        \\n  dragularService([$element.children()[0].children(), {\\n    boundingBox: $element.children()[0],\\n    lockX: true\\n  });\\n        \\n      
\\n
\");\n\t$templateCache.put(\"exampleBoundingBoxLockY/exampleBoundingBoxLockY.html\",\"
\\n

BoundingBox and LockY

\\n \\n
\\n
\\n
\\n
Items are locked in Y axis movement and cannot cross its closest parent div.boundingBox, just try it your selves.
\\n
item 2
\\n
item 3
\\n
item 4
\\n
item 5
\\n
item 6
\\n
\\n
\\n
\\n
\\n        \\n  dragularService([$element.children()[0].children(), {\\n    boundingBox: $element.children()[0],\\n    lockY: true\\n  });\\n        \\n      
\\n
\");\n\t$templateCache.put(\"exampleCopy/exampleCopy.html\",\"
\\n

Copy

\\n \\n
\\n
\\n
Move me, and make copy on drop.
\\n
If you try to drop me somewhere other than these containers, I\\'ll just come back.
\\n
\\n
\\n
You can drop me in the left container, otherwise I\\'ll stay here.
\\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\t$templateCache.put(\"exampleCopyWithModel/exampleCopyWithModel.html\",\"
\\n

Copy - with model

\\n \\n
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
\\n
\\n
Items1:\\n
\\n            {{ items1 | json }}\\n          
\\n
\\n
\\n
\\n
Items2:\\n
\\n            {{ items2 | json }}\\n          
\\n
\\n
\\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\");\n\t$templateCache.put(\"exampleCustomClasses/exampleCustomClasses.html\",\"
\\n

Custom classes

\\n \\n
\\n
\\n
Move me, but you can only drop me in one of these containers.
\\n
If you try to drop me somewhere other than these containers, I\\'ll just come back.
\\n
Item 3.
\\n
Item 6.
\\n
\\n
\\n
You can drop me in the left container, otherwise I\\'ll stay here.
\\n
Item 4.
\\n
Item 5.
\\n
\\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      
\\n
\\n\");\n\t$templateCache.put(\"exampleDifferentOptionsWithModel/exampleDifferentOptionsWithModel.html\",\"
\\n

Different options - with model

\\n \\n
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
\\n
\\n
Items1:\\n          
{{items1 | json}}
\\n
\\n
\\n
Items2:\\n          
{{items2 | json}}
\\n
\\n
\\n
\\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\t$templateCache.put(\"exampleDirective/exampleDirective.html\",\"
\\n

Directive

\\n \\n
\\n
\\n
Move me, but you can only drop me in one of these containers.
\\n
If you try to drop me somewhere other than these containers, I\\'ll just come back.
\\n
Item 3.
\\n
Item 6.
\\n
\\n
\\n
You can drop me in the left container, otherwise I\\'ll stay here.
\\n
Item 4.
\\n
Item 5.
\\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\t$templateCache.put(\"exampleDirectiveWithModel/exampleDirectiveWithModel.html\",\"
\\n

Directive - with model

\\n \\n
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
\\n
\\n
Items1:\\n
{{items1 | json}}
\\n
\\n
\\n
Items2:\\n
{{items2 | json}}
\\n
\\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      
\\n
\\n\");\n\t$templateCache.put(\"exampleDragOverEvents/exampleDragOverEvents.html\",\"
\\n

Drag-over events

\\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\\n
\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
dragularService.shared.itemitem beeing dragged (it is copy of item if copy is enabled via options)
dragularService.shared.sourcesource container item is dragged from
dragularService.shared.sourceModelsource container model representation if model was porvided
dragularService.shared.initialIndexoriginal index of item, can be used to get item model from sourceModel
dragularService.shared.extracontains accepting information (boolean) on dragenter, element drag is leaving to on dragleave and element behind the cursor on dragrelease
\\n
\\n\\n

Try to drag over the not-container too.

\\n
\\n
\\n
apples and oranges cannot be mixed
\\n
apple 2
\\n
apple 3
\\n
apple 4
\\n
\\n
\\n
orange 1
\\n
orange 2
\\n
orange 3
\\n
orange 4
\\n
\\n
\\n
apple 5
\\n
apple 6
\\n
apple 7
\\n
apple 8
\\n
\\n
\\n
orange 5
\\n
orange 6
\\n
orange 7
\\n
orange 8
\\n
\\n
\\n
Test active class on NOT container.
\\n\\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  
\\n
\\n\");\n\t$templateCache.put(\"exampleEvents/exampleEvents.html\",\"
\\n

Events

\\n \\n
\\n
\\n
Move me, but you can only drop me in one of these containers.
\\n
If you try to drop me somewhere other than these containers, I\\'ll just come back.
\\n
Item 3.
\\n
Item 6.
\\n
\\n
\\n
You can drop me in the left container, otherwise I\\'ll stay here.
\\n
Item 4.
\\n
Item 5.
\\n
\\n
\\n
\\n        \\n.controller(\\'Events\\', [\\'$scope\\', \\'$element\\', \\'dragularService\\', \\'$timeout\\', function TodoCtrl($scope, $element, dragularService, $timeout) {\\n    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\\'));\\n    $scope.$on(\\'dragulardrag\\', myFn(\\'drag\\'));\\n    $scope.$on(\\'dragularcancel\\', myFn(\\'cancel\\'));\\n    $scope.$on(\\'dragulardrop\\', myFn(\\'drop\\'));\\n    $scope.$on(\\'dragularremove\\', myFn(\\'remove\\'));\\n    $scope.$on(\\'dragulardragend\\', myFn(\\'dragend\\'));\\n    $scope.$on(\\'dragularshadow\\', myFn(\\'shadow\\'));\\n\\n    function myFn(eventName) {\\n      return function() {\\n        console.log(eventName, arguments);\\n      };\\n    }\\n\\n  }]);\\n        \\n      
\\n
\\n\");\n\t$templateCache.put(\"exampleHandle/exampleHandle.html\",\"
\\n

Handle

\\n \\n
\\n
\\n
+Move me, but you can use the plus sign to drag me around.
\\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      
\\n
\\n\");\n\t$templateCache.put(\"exampleIsContainerWithModel/exampleIsContainerWithModel.html\",\"
\\n

isContainer - with model

\\n \\n
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
{{item.content}}\\n
\\n
\\n
\\n
\\n
\\n
Items1:\\n          
{{items1 | json}}
\\n
\\n
\\n
Cart:\\n          
{{cartModel | json}}
\\n
\\n
\\n
\\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
\\n\");\n\t$templateCache.put(\"exampleNameSpaces/exampleNameSpaces.html\",\"
\\n

NameSpaces

\\n \\n
\\n
\\n
try to mix oranges and apples
\\n
apple 2
\\n
apple 3
\\n
apple 4
\\n
\\n
\\n
orange 1
\\n
orange 2
\\n
orange 3
\\n
orange 4
\\n
\\n
\\n
apple 5
\\n
apple 6
\\n
apple 7
\\n
apple 8
\\n
\\n
\\n
mixed 1
\\n
mixed 2
\\n
mixed 3
\\n
mixed 4
\\n
\\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\t$templateCache.put(\"exampleNestedNgRepeat/exampleNestedNgRepeat.html\",\"
\\n

Nested ngRepeat

\\n \\n
\\n
\\n
Row {{$index}}
\\n
{{item.content}}
\\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\");\n\t$templateCache.put(\"exampleNestedNgRepeatWithModel/exampleNestedNgRepeatWithModel.html\",\"
\\n

Nested ngRepeat - with model

\\n \\n
\\n
\\n
\\n
\\n
Row {{::$index}}
\\n
\\n
{{item.content}}
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n            
Items:\\n
{{items | json}}
\\n
\\n
\\n
\\n
\\n
\\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\t$templateCache.put(\"exampleNgRepeat/exampleNgRepeat.html\",\"
\\n

ngRepeat

\\n \\n
\\n
\\n
\\n {{item.content}}\\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
\\n\");\n\t$templateCache.put(\"exampleNgRepeatFilteredWithModel/exampleNgRepeatFilteredWithModel.html\",\"
\\n

Filtered ngRepeat - with model

\\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!

\\n
\\n
\\n
\\n \\n
\\n
\\n \\n
\\n
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
\\n
\\n
Items1:\\n          
{{items1 | json}}
\\n
\\n
\\n
Items2:\\n          
{{items2 | json}}
\\n
\\n
\\n
\\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\");\n\t$templateCache.put(\"exampleNgRepeatWithModel/exampleNgRepeatWithModel.html\",\"
\\n

ngRepeat - with model

\\n \\n
\\n
\\n
\\n
\\n {{item.content}}\\n \\n \\n
\\n
\\n
\\n
\\n
\\n
Items:\\n
{{items | json}}
\\n
\\n
\\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\t$templateCache.put(\"exampleRemoveOnSpill/exampleRemoveOnSpill.html\",\"
\\n

Remove on spill

\\n \\n
\\n
\\n
Move me, but you can only drop me in containers.
\\n
If you try to drop me somewhere other than containers, I\\'ll die a fiery death.
\\n
Item 3.
\\n
Item 6.
\\n
Item 4.
\\n
Item 5.
\\n
\\n
\\n
You can drop me in the left container.
\\n
Item 4.
\\n
Item 5.
\\n
\\n
\\n
\\n        \\n  dragularService([document.getElementById(single)], { removeOnSpill: true });\\n        \\n      
\\n
\");\n\t$templateCache.put(\"exampleRemoveOnSpillWithModel/exampleRemoveOnSpillWithModel.html\",\"
\\n

Remove on spill - with model

\\n \\n
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
\\n
\\n
Items1:\\n          
{{items1 | json}}
\\n
\\n
\\n
Items2:\\n          
{{items2 | json}}
\\n
\\n
\\n
\\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\");\n\t$templateCache.put(\"exampleRevertOnSpill/exampleRevertOnSpill.html\",\"
\\n

Revert on spill

\\n \\n
\\n
\\n
Move me, but you can only drop me in one of these containers.
\\n
If you try to drop me somewhere other than these containers, I\\'ll just come back.
\\n
Item 3.
\\n
Item 6.
\\n
\\n
\\n
You can drop me in the left container, otherwise I\\'ll stay here.
\\n
Item 4.
\\n
Item 5.
\\n
\\n
\\n
\\n        \\n  dragularService([document.getElementById(left), document.getElementById(right)], { revertOnSpill: true });\\n        \\n      
\\n
\");\n\t$templateCache.put(\"exampleScrollingDrag/exampleScrollingDrag.html\",\"
\\n

Scrolling drag

\\n \\n
\\n
\\n
up
\\n
\\n
Item 1.
\\n
Item 2.
\\n
Item 3.
\\n
Item 4.
\\n
Item 5.
\\n
Item 6.
\\n
Item 7.
\\n
Item 9.
\\n
Item 10.
\\n
Item 11.
\\n
Item 12.
\\n
Item 13.
\\n
\\n
down
\\n
\\n
\\n
\\n
\\n
Item 1.
\\n
Item 2.
\\n
Item 3.
\\n
Item 4.
\\n
Item 5.
\\n
Item 6.
\\n
Item 7.
\\n
Item 9.
\\n
Item 10.
\\n
Item 11.
\\n
Item 12.
\\n
Item 13.
\\n
\\n
\\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\t$templateCache.put(\"partials/partial-contribute.html\",\"
\\n
\\n
\\n \\n
\\n
\\n
\\n\");\n\t$templateCache.put(\"partials/partial-docs.html\",\"
\\n
\\n
\\n \\n
\\n \\n
\\n

\\n \\n

\\n \\n
\\n
\\n \\n
\\n \\n
\\n\");\n\t$templateCache.put(\"partials/partial-home.html\",\"
\\n
\\n \\n
\\n
\\n

DRAGULAR

\\n

Angular drag&drop based on dragula.

\\n

Live examples in docs

\\n
\\n
\\n
\\n

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

\\n

Inspiration

\\n

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

\\n

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

\\n

Differences of dragular (against dragula)

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

Todo

\\n
    \\n
  • improve docs
  • \\n
\\n

Features

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

For installation, usage and examples go to docs

\\n
\\n
\\n \\n
\\n \\n
\\n \\n
\\n\");\n\t$templateCache.put(\"partials/autogenerated/contribute.html\",\"

How to contribute

\\n

It'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.

\\n

Before contributing, please read the code of conduct.

\\n

Reporting issues

\\n

GitHub 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:

\\n

1. 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.

\\n

2. Not sure if it's a bug?. Then please ask via issues and tag it [question].

\\n

3. 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.

\\n

4. 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)

\\n

5. 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.

\\n

Dev vs. Master

\\n

The 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.

\\n

Making Changes

\\n

To take advantage of our npm build script and jshint config it will be easiest for you if you have node.js installed locally.

\\n

You can download node.js from nodejs.org.

\\n

After 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.

\\n

Developing

\\n

There are several gulp tasks that are used for generating different builds:

\\n
    \\n
  • gulp dev - Serves files with BrowserSync server, watches & automatically refreshes connected browsers on changes, generates non-minified but concatenated styles & scripts from the dragular source.
  • \\n
  • gulp dev:docs - Does exactly the same as gulp dev, except it works with the documentation source.
  • \\n
  • gulp build - Concatenates and minifies dragular source files.
  • \\n
  • gulp build:docs - Concatenates and minifies documentation source files.
  • \\n
\\n

Linting

\\n
    \\n
  • gulp lint & gulp lint:docs - Lint JavaScript files.
  • \\n
\\n

Making a pull request

\\n

Once that is ready, make your changes and submit a Pull Request:

\\n
    \\n
  • Send 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.

    \\n
  • \\n
  • Ensure changes are jshint validated. Our JSHint configuration file is provided in the repository and you should check against it before submitting.

    \\n
  • \\n
  • Only 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.

    \\n
  • \\n
\\n

Dependencies for building from source and running tests:

\\n

Coding style preferences are not contributions

\\n

If 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.

\\n

I don't really like git / node.js, but I can fix this bug

\\n

That 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/partials/autogenerated/contribute.html b/docs/src/examples/partials/autogenerated/contribute.html index 8c6585e4..3782da80 100644 --- a/docs/src/examples/partials/autogenerated/contribute.html +++ b/docs/src/examples/partials/autogenerated/contribute.html @@ -6,7 +6,7 @@

Reporting issues

1. 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.

2. Not sure if it's a bug?. Then please ask via issues and tag it [question].

3. 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.

-

4. Include a live example. After narrowing your code down to only the problem areas, make use of jsFiddle, 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 fiddle)

+

4. 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)

5. 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.

Dev vs. Master

The 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.

diff --git a/docs/src/examples/templates.js b/docs/src/examples/templates.js index a379081b..2ee2cfc0 100644 --- a/docs/src/examples/templates.js +++ b/docs/src/examples/templates.js @@ -1,6 +1,6 @@ 'use strict'; module.exports = angular.module("templates", []).run(["$templateCache", function($templateCache) {$templateCache.put("docsInstall/docsInstall.html","

Install

\n

download dragular.js and dragular.css from dist folder

\n

OR clone git

\n
\ngit clone http://github.com/luckylooke/dragular.git\n
\n

OR use npm

\n
\n[sudo] npm install dragular\n
\n

OR use bower

\n
\nbower install dragular\n
\n

AND 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
\n

AND put dragularModule into dependency array

\n
\nvar app = angular.module(\'myApp\', [\'dragularModule\', \'otherDependencies\']);\n
\n

DONE :)

\n"); -$templateCache.put("exampleBasic/exampleBasic.html","
\n

Basic

\n \n
\n
\n
Move me, but you can only drop me in one of these containers.
\n
If you try to drop me somewhere other than these containers, I\'ll just come back.
\n
Item 3.
\n
Item 6.
\n
\n
\n
You can drop me in the left container, otherwise I\'ll stay here.
\n
Try to click me, dragular distinguish drag from click
\n
Item 5.
\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      
\n
\n"); $templateCache.put("exampleBasicWithModel/exampleBasicWithModel.html","
\n

Basic - with model

\n \n
\n
\n
\n
{{item.content}}
\n
\n
\n
{{item.content}}
\n
\n
\n
\n
\n
Items1:\n          
{{items1 | json}}
\n
\n
\n
Items2:\n          
{{items2 | json}}
\n
\n
\n
\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"); +$templateCache.put("exampleBasic/exampleBasic.html","
\n

Basic

\n \n
\n
\n
Move me, but you can only drop me in one of these containers.
\n
If you try to drop me somewhere other than these containers, I\'ll just come back.
\n
Item 3.
\n
Item 6.
\n
\n
\n
You can drop me in the left container, otherwise I\'ll stay here.
\n
Try to click me, dragular distinguish drag from click
\n
Item 5.
\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      
\n
\n"); $templateCache.put("exampleBoundingBox/exampleBoundingBox.html","
\n

BoundingBox

\n \n
\n
\n
This items cannot cross its example element, just try it your selves.
\n
Item 2.
\n
Item 3.
\n
Item 6.
\n
\n
\n
This items cannot cross its example element, just try it your selves.
\n
Item 4.
\n
Item 5.
\n
\n
\n
\n        \n  dragularService([$element.children(), {\n    boundingBox: $element\n  });\n        \n      
\n
"); $templateCache.put("exampleBoundingBoxLockX/exampleBoundingBoxLockX.html","
\n

BoundingBox and lockX

\n \n
\n
\n
\n
Items are locked in X axis movement and cannot cross its closest parent div.boundingBox, just try it your selves.
\n
item 2
\n
item 3
\n
item 4
\n
\n
\n
\n
\n        \n  dragularService([$element.children()[0].children(), {\n    boundingBox: $element.children()[0],\n    lockX: true\n  });\n        \n      
\n
"); $templateCache.put("exampleBoundingBoxLockY/exampleBoundingBoxLockY.html","
\n

BoundingBox and LockY

\n \n
\n
\n
\n
Items are locked in Y axis movement and cannot cross its closest parent div.boundingBox, just try it your selves.
\n
item 2
\n
item 3
\n
item 4
\n
item 5
\n
item 6
\n
\n
\n
\n
\n        \n  dragularService([$element.children()[0].children(), {\n    boundingBox: $element.children()[0],\n    lockY: true\n  });\n        \n      
\n
"); @@ -27,4 +27,4 @@ $templateCache.put("exampleScrollingDrag/exampleScrollingDrag.html","
\n
\n
\n \n
\n
\n
\n"); $templateCache.put("partials/partial-docs.html","
\n
\n
\n \n
\n \n
\n

\n \n

\n \n
\n
\n \n
\n \n
\n"); $templateCache.put("partials/partial-home.html","
\n
\n \n
\n
\n

DRAGULAR

\n

Angular drag&drop based on dragula.

\n

Live examples in docs

\n
\n
\n
\n

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

\n

Inspiration

\n

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

\n

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

\n

Differences of dragular (against dragula)

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

Todo

\n
    \n
  • improve docs
  • \n
\n

Features

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

For installation, usage and examples go to docs

\n
\n
\n \n
\n \n
\n \n
\n"); -$templateCache.put("partials/autogenerated/contribute.html","

How to contribute

\n

It'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.

\n

Before contributing, please read the code of conduct.

\n

Reporting issues

\n

GitHub 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:

\n

1. 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.

\n

2. Not sure if it's a bug?. Then please ask via issues and tag it [question].

\n

3. 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.

\n

4. Include a live example. After narrowing your code down to only the problem areas, make use of jsFiddle, 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 fiddle)

\n

5. 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.

\n

Dev vs. Master

\n

The 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.

\n

Making Changes

\n

To take advantage of our npm build script and jshint config it will be easiest for you if you have node.js installed locally.

\n

You can download node.js from nodejs.org.

\n

After 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.

\n

Developing

\n

There are several gulp tasks that are used for generating different builds:

\n
    \n
  • gulp dev - Serves files with BrowserSync server, watches & automatically refreshes connected browsers on changes, generates non-minified but concatenated styles & scripts from the dragular source.
  • \n
  • gulp dev:docs - Does exactly the same as gulp dev, except it works with the documentation source.
  • \n
  • gulp build - Concatenates and minifies dragular source files.
  • \n
  • gulp build:docs - Concatenates and minifies documentation source files.
  • \n
\n

Linting

\n
    \n
  • gulp lint & gulp lint:docs - Lint JavaScript files.
  • \n
\n

Making a pull request

\n

Once that is ready, make your changes and submit a Pull Request:

\n
    \n
  • Send 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.

    \n
  • \n
  • Ensure changes are jshint validated. Our JSHint configuration file is provided in the repository and you should check against it before submitting.

    \n
  • \n
  • Only 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.

    \n
  • \n
\n

Dependencies for building from source and running tests:

\n

Coding style preferences are not contributions

\n

If 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.

\n

I don't really like git / node.js, but I can fix this bug

\n

That 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");}]); \ No newline at end of file +$templateCache.put("partials/autogenerated/contribute.html","

How to contribute

\n

It'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.

\n

Before contributing, please read the code of conduct.

\n

Reporting issues

\n

GitHub 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:

\n

1. 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.

\n

2. Not sure if it's a bug?. Then please ask via issues and tag it [question].

\n

3. 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.

\n

4. 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)

\n

5. 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.

\n

Dev vs. Master

\n

The 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.

\n

Making Changes

\n

To take advantage of our npm build script and jshint config it will be easiest for you if you have node.js installed locally.

\n

You can download node.js from nodejs.org.

\n

After 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.

\n

Developing

\n

There are several gulp tasks that are used for generating different builds:

\n
    \n
  • gulp dev - Serves files with BrowserSync server, watches & automatically refreshes connected browsers on changes, generates non-minified but concatenated styles & scripts from the dragular source.
  • \n
  • gulp dev:docs - Does exactly the same as gulp dev, except it works with the documentation source.
  • \n
  • gulp build - Concatenates and minifies dragular source files.
  • \n
  • gulp build:docs - Concatenates and minifies documentation source files.
  • \n
\n

Linting

\n
    \n
  • gulp lint & gulp lint:docs - Lint JavaScript files.
  • \n
\n

Making a pull request

\n

Once that is ready, make your changes and submit a Pull Request:

\n
    \n
  • Send 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.

    \n
  • \n
  • Ensure changes are jshint validated. Our JSHint configuration file is provided in the repository and you should check against it before submitting.

    \n
  • \n
  • Only 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.

    \n
  • \n
\n

Dependencies for building from source and running tests:

\n

Coding style preferences are not contributions

\n

If 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.

\n

I don't really like git / node.js, but I can fix this bug

\n

That 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");}]); \ No newline at end of file diff --git a/src/dragularService.js b/src/dragularService.js index c6816031..892ab3e3 100644 --- a/src/dragularService.js +++ b/src/dragularService.js @@ -623,7 +623,12 @@ var dragularService = function ( $rootScope, $compile ) { while ( target && !accepted() ) { target = getParent( target ); } - shared.targetCtx = targetCtx || {}; + + // bugfix #148 model not updated on spill + if ( targetCtx ){ + shared.targetCtx = targetCtx; + } + return target; function accepted() { @@ -837,6 +842,8 @@ var dragularService = function ( $rootScope, $compile ) { function release( e ) { + + console.log('release'); ungrab(); if ( !drake.dragging ) { return; From 21c87bc2aa5e83dee766d9775f477245dc1176b2 Mon Sep 17 00:00:00 2001 From: Ctibor Laky Date: Mon, 26 Jun 2017 22:06:58 +0200 Subject: [PATCH 2/2] Spy Kids v4.4.3 --- bower.json | 2 +- dist/dragular.js | 4 +++- dist/dragular.min.js.map | 2 +- docs/dist/examples.js | 6 +++--- docs/dist/examples.min.js | 4 ++-- docs/dist/examples.min.js.map | 2 +- docs/src/examples/partials/partial-home.html | 2 +- docs/src/examples/templates.js | 4 ++-- readme.md | 2 +- src/dragularModule.js | 2 +- 10 files changed, 16 insertions(+), 14 deletions(-) diff --git a/bower.json b/bower.json index 58ec6ae8..7d325320 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "dragular", - "version": "4.4.2", + "version": "4.4.3", "description": "Angular drag and drop library based on dragula, but full featured. For light-weight angular wrap of dragula look for angular-dragula", "main": [ "dist/dragular.js", diff --git a/dist/dragular.js b/dist/dragular.js index 04e19074..a631799d 100644 --- a/dist/dragular.js +++ b/dist/dragular.js @@ -60,7 +60,7 @@ return /******/ (function(modules) { // webpackBootstrap var dragularService = __webpack_require__( 2 ); /** - * Dragular 4.4.2 by Luckylooke https://github.com/luckylooke/dragular + * Dragular 4.4.3 by Luckylooke https://github.com/luckylooke/dragular * Angular version of dragula https://github.com/bevacqua/dragula */ module.exports = 'dragularModule'; @@ -970,6 +970,8 @@ return /******/ (function(modules) { // webpackBootstrap function release( e ) { + + console.log('release'); ungrab(); if ( !drake.dragging ) { return; diff --git a/dist/dragular.min.js.map b/dist/dragular.min.js.map index 439a97a6..799d58f5 100644 --- a/dist/dragular.min.js.map +++ b/dist/dragular.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["dragular.js"],"names":["root","factory","exports","module","define","amd","a","i","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","dragularDirective","dragularService","angular","directive","dragular","restrict","link","$scope","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","length","_isArray","isElement","initialContainers","document","querySelectorAll","o","copyOptions","extendOptions","tmp","extend","defaultOptions","classes","defaultClasses","eventNames","defaultEventNames","processOptionsObject","boundingBox","sanitizeContainers","containersFilteredModel","forEach","len","getContainers","shLen","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","cloneNode","$emit","dragularcloned","containerIndex","indexOf","domIndexOf","dragulardrag","manualStart","rect","getBoundingClientRect","width","height","getRectWidth","getRectHeight","mirrorContainer","appendChild","body","unselectable","scrollContainer","drop","ungrab","moved","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","compileItemOnDrop","element","$applyAsync","content","dragulardrop","dropIndex","splice","dropElmModel","dontCopyModel","dragularremove","removeMirrorImage","dragularout","dragulardragend","destroy","removeContainers","all","changes","makeArray","index","before","scrollTop","deltaY","stopPropagation","depSanitize","getBool","dragularover","never","getEmptyObject","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"],"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,GAAI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OI,OAAS4L,QAGjB7J,EAAQnC,OAASA,EAEVmC,EA2yCR5D,GAAgBwB,SAAY,aAAc,YAE1CzC,EAAOD,QAAUkB","file":"dragular.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 */\n\t'use strict';\n\tvar dragularDirective = __webpack_require__( 1 );\n\tvar dragularService = __webpack_require__( 2 );\n\n\t/**\n\t * Dragular 4.4.2 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/* 1 */\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/* 2 */\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\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: getEmptyObject, // 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\t\t\t\tif ( !_isArray( o.nameSpace ) ) {\n\t\t\t\t\to.nameSpace = [ o.nameSpace ];\n\t\t\t\t}\n\t\t\t\to.nameSpace.forEach( function eachNameSpace( nameSpace ) {\n\t\t\t\t\tif ( !shared.containers[ nameSpace ] ) {\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\t\t\t\t\tvar len = getContainers( o ).length,\n\t\t\t\t\t\tshLen = shared.containers[ nameSpace ].length;\n\t\t\t\t\tfor ( var i = 0; i < len; i++ ) {\n\t\t\t\t\t\tshared.containers[ nameSpace ][ i + shLen ] = getContainers( o )[ i ];\n\t\t\t\t\t\tshared.containersCtx[ nameSpace ][ i + shLen ] = {\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\tconsole.log( 'usecase?' );\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\tshared.item = context.item.cloneNode( true );\n\t\t\t\t\tshared.copy = true;\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\to.scope.$emit( o.eventNames[ 'dragular' + type ], shared.item, shared.lastDropTarget, shared.source, e );\n\t\t\t\t\t}\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}\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\tif ( 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.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\tconsole.log('release');\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\tif ( isInitialPlacement( target ) ) {\n\t\t\t\t\t\t\to.scope.$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\to.scope.$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\n\t\t\t\t\tif ( !o.compileItemOnDrop ) {\n\t\t\t\t\t\tcleanup();\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 getEmptyObject() {\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/******/ ])\n});\n;"]} \ No newline at end of file +{"version":3,"sources":["dragular.js"],"names":["root","factory","exports","module","define","amd","a","i","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","dragularDirective","dragularService","angular","directive","dragular","restrict","link","$scope","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","length","_isArray","isElement","initialContainers","document","querySelectorAll","o","copyOptions","extendOptions","tmp","extend","defaultOptions","classes","defaultClasses","eventNames","defaultEventNames","processOptionsObject","boundingBox","sanitizeContainers","containersFilteredModel","forEach","len","getContainers","shLen","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","cloneNode","$emit","dragularcloned","containerIndex","indexOf","domIndexOf","dragulardrag","manualStart","rect","getBoundingClientRect","width","height","getRectWidth","getRectHeight","mirrorContainer","appendChild","body","unselectable","scrollContainer","drop","ungrab","moved","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","compileItemOnDrop","element","$applyAsync","content","dragulardrop","dropIndex","splice","dropElmModel","dontCopyModel","dragularremove","removeMirrorImage","dragularout","dragulardragend","destroy","removeContainers","all","changes","makeArray","index","before","scrollTop","deltaY","stopPropagation","depSanitize","getBool","dragularover","never","getEmptyObject","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"],"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,SAASP,EAAQD,EAASQ,GAG/B,YACA,IAAIS,GAA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,KAAKiD,QAAS,aAEhB8J,EAAKxM,cAAc4K,QAAS,GAAK2B,EAAML,QAAS,SAAU,SAOpE,QAASxL,GAAW0F,GACnB,MAAOA,GAAGxF,aAAe9D,SAAW,KAAOsJ,EAAGxF,WAG/C,QAASlB,GAAS0G,GACjB,MAAsB,UAAfA,EAAGsG,SAAsC,aAAftG,EAAGsG,SAAyC,WAAftG,EAAGsG,SAAwBC,EAAYvG,GAGtG,QAASuG,GAAYvG,GACpB,QAAMA,IAGsB,UAAvBA,EAAGwG,kBAGoB,SAAvBxG,EAAGwG,iBAGDD,EAAYjM,EAAW0F,MAG/B,QAASzD,GAAYkK,EAAOlM,GAC3B,MAAO8J,OAAMC,UAAUhI,QAAQtK,KAAMM,QAAQgP,QAAS/G,GAAS0F,WAAYwG,GAG5E,QAASnI,GAAW7J,EAAQvB,EAAGwT,GACxBjS,IAGNX,EAAO4S,MAAQA,EACVjS,EAAOkS,cACXlS,EAAOkS,cAAezT,GAEtBuB,EAAO6J,UAAW,KAAOpL,EAAE4F,UAAW5F,IAIxC,QAAS2P,GAAS+D,EAAMC,EAAM3N,GAC7B,MAAKoG,GAAasH,KACRA,EAAKE,MAAO5N,GAAWzH,KAAMoV,GAAQ/S,KAErC8S,EApzCX,GAAIlO,GAAOhC,SACV0B,EAAUM,EAAKqO,gBACfxQ,EAAW8N,MAAM2C,QACjB1H,EAAchN,QAAQ2U,UAYvB,OATAhR,GAAQiR,gBAAkB,WACzBpT,EAAOC,gBACPD,EAAOE,iBACPF,EAAOG,cACPH,EAAOI,OAAS4L,QAGjB7J,EAAQnC,OAASA,EAEVmC,EA2yCR5D,GAAgBwB,SAAY,aAAc,YAE1CzC,EAAOD,QAAUkB","file":"dragular.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 */\n\t'use strict';\n\tvar dragularDirective = __webpack_require__( 1 );\n\tvar dragularService = __webpack_require__( 2 );\n\n\t/**\n\t * Dragular 4.4.3 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/* 1 */\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/* 2 */\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\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: getEmptyObject, // 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\t\t\t\tif ( !_isArray( o.nameSpace ) ) {\n\t\t\t\t\to.nameSpace = [ o.nameSpace ];\n\t\t\t\t}\n\t\t\t\to.nameSpace.forEach( function eachNameSpace( nameSpace ) {\n\t\t\t\t\tif ( !shared.containers[ nameSpace ] ) {\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\t\t\t\t\tvar len = getContainers( o ).length,\n\t\t\t\t\t\tshLen = shared.containers[ nameSpace ].length;\n\t\t\t\t\tfor ( var i = 0; i < len; i++ ) {\n\t\t\t\t\t\tshared.containers[ nameSpace ][ i + shLen ] = getContainers( o )[ i ];\n\t\t\t\t\t\tshared.containersCtx[ nameSpace ][ i + shLen ] = {\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\tconsole.log( 'usecase?' );\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\tshared.item = context.item.cloneNode( true );\n\t\t\t\t\tshared.copy = true;\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\to.scope.$emit( o.eventNames[ 'dragular' + type ], shared.item, shared.lastDropTarget, shared.source, e );\n\t\t\t\t\t}\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}\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\tif ( 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.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\tconsole.log('release');\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\tif ( isInitialPlacement( target ) ) {\n\t\t\t\t\t\t\to.scope.$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\to.scope.$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\n\t\t\t\t\tif ( !o.compileItemOnDrop ) {\n\t\t\t\t\t\tcleanup();\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 getEmptyObject() {\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/******/ ])\n});\n;"]} \ No newline at end of file diff --git a/docs/dist/examples.js b/docs/dist/examples.js index 2fe728c8..b103d578 100644 --- a/docs/dist/examples.js +++ b/docs/dist/examples.js @@ -259,7 +259,7 @@ return /******/ (function(modules) { // webpackBootstrap var dragularService = __webpack_require__( 3 ); /** - * Dragular 4.4.2 by Luckylooke https://github.com/luckylooke/dragular + * Dragular 4.4.3 by Luckylooke https://github.com/luckylooke/dragular * Angular version of dragula https://github.com/bevacqua/dragula */ module.exports = 'dragularModule'; @@ -2702,8 +2702,8 @@ return /******/ (function(modules) { // webpackBootstrap /***/ function(module, exports) { 'use strict'; module.exports = angular.module("templates", []).run(["$templateCache", function($templateCache) {$templateCache.put("docsInstall/docsInstall.html","

Install

\n

download dragular.js and dragular.css from dist folder

\n

OR clone git

\n
\ngit clone http://github.com/luckylooke/dragular.git\n
\n

OR use npm

\n
\n[sudo] npm install dragular\n
\n

OR use bower

\n
\nbower install dragular\n
\n

AND 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
\n

AND put dragularModule into dependency array

\n
\nvar app = angular.module(\'myApp\', [\'dragularModule\', \'otherDependencies\']);\n
\n

DONE :)

\n"); - $templateCache.put("exampleBasicWithModel/exampleBasicWithModel.html","
\n

Basic - with model

\n \n
\n
\n
\n
{{item.content}}
\n
\n
\n
{{item.content}}
\n
\n
\n
\n
\n
Items1:\n          
{{items1 | json}}
\n
\n
\n
Items2:\n          
{{items2 | json}}
\n
\n
\n
\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"); $templateCache.put("exampleBasic/exampleBasic.html","
\n

Basic

\n \n
\n
\n
Move me, but you can only drop me in one of these containers.
\n
If you try to drop me somewhere other than these containers, I\'ll just come back.
\n
Item 3.
\n
Item 6.
\n
\n
\n
You can drop me in the left container, otherwise I\'ll stay here.
\n
Try to click me, dragular distinguish drag from click
\n
Item 5.
\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      
\n
\n"); + $templateCache.put("exampleBasicWithModel/exampleBasicWithModel.html","
\n

Basic - with model

\n \n
\n
\n
\n
{{item.content}}
\n
\n
\n
{{item.content}}
\n
\n
\n
\n
\n
Items1:\n          
{{items1 | json}}
\n
\n
\n
Items2:\n          
{{items2 | json}}
\n
\n
\n
\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"); $templateCache.put("exampleBoundingBox/exampleBoundingBox.html","
\n

BoundingBox

\n \n
\n
\n
This items cannot cross its example element, just try it your selves.
\n
Item 2.
\n
Item 3.
\n
Item 6.
\n
\n
\n
This items cannot cross its example element, just try it your selves.
\n
Item 4.
\n
Item 5.
\n
\n
\n
\n        \n  dragularService([$element.children(), {\n    boundingBox: $element\n  });\n        \n      
\n
"); $templateCache.put("exampleBoundingBoxLockX/exampleBoundingBoxLockX.html","
\n

BoundingBox and lockX

\n \n
\n
\n
\n
Items are locked in X axis movement and cannot cross its closest parent div.boundingBox, just try it your selves.
\n
item 2
\n
item 3
\n
item 4
\n
\n
\n
\n
\n        \n  dragularService([$element.children()[0].children(), {\n    boundingBox: $element.children()[0],\n    lockX: true\n  });\n        \n      
\n
"); $templateCache.put("exampleBoundingBoxLockY/exampleBoundingBoxLockY.html","
\n

BoundingBox and LockY

\n \n
\n
\n
\n
Items are locked in Y axis movement and cannot cross its closest parent div.boundingBox, just try it your selves.
\n
item 2
\n
item 3
\n
item 4
\n
item 5
\n
item 6
\n
\n
\n
\n
\n        \n  dragularService([$element.children()[0].children(), {\n    boundingBox: $element.children()[0],\n    lockY: true\n  });\n        \n      
\n
"); @@ -2729,7 +2729,7 @@ return /******/ (function(modules) { // webpackBootstrap $templateCache.put("exampleScrollingDrag/exampleScrollingDrag.html","
\n

Scrolling drag

\n \n
\n
\n
up
\n
\n
Item 1.
\n
Item 2.
\n
Item 3.
\n
Item 4.
\n
Item 5.
\n
Item 6.
\n
Item 7.
\n
Item 9.
\n
Item 10.
\n
Item 11.
\n
Item 12.
\n
Item 13.
\n
\n
down
\n
\n
\n
\n
\n
Item 1.
\n
Item 2.
\n
Item 3.
\n
Item 4.
\n
Item 5.
\n
Item 6.
\n
Item 7.
\n
Item 9.
\n
Item 10.
\n
Item 11.
\n
Item 12.
\n
Item 13.
\n
\n
\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"); $templateCache.put("partials/partial-contribute.html","
\n
\n
\n \n
\n
\n
\n"); $templateCache.put("partials/partial-docs.html","
\n
\n
\n \n
\n \n
\n

\n \n

\n \n
\n
\n \n
\n \n
\n"); - $templateCache.put("partials/partial-home.html","
\n
\n \n
\n
\n

DRAGULAR

\n

Angular drag&drop based on dragula.

\n

Live examples in docs

\n
\n
\n
\n

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

\n

Inspiration

\n

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

\n

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

\n

Differences of dragular (against dragula)

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

Todo

\n
    \n
  • improve docs
  • \n
\n

Features

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

For installation, usage and examples go to docs

\n
\n
\n \n
\n \n
\n \n
\n"); + $templateCache.put("partials/partial-home.html","
\n
\n \n
\n
\n

DRAGULAR

\n

Angular drag&drop based on dragula.

\n

Live examples in docs

\n
\n
\n
\n

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

\n

Inspiration

\n

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

\n

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

\n

Differences of dragular (against dragula)

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

Todo

\n
    \n
  • improve docs
  • \n
\n

Features

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

For installation, usage and examples go to docs

\n
\n
\n \n
\n \n
\n \n
\n"); $templateCache.put("partials/autogenerated/contribute.html","

How to contribute

\n

It'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.

\n

Before contributing, please read the code of conduct.

\n

Reporting issues

\n

GitHub 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:

\n

1. 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.

\n

2. Not sure if it's a bug?. Then please ask via issues and tag it [question].

\n

3. 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.

\n

4. 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)

\n

5. 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.

\n

Dev vs. Master

\n

The 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.

\n

Making Changes

\n

To take advantage of our npm build script and jshint config it will be easiest for you if you have node.js installed locally.

\n

You can download node.js from nodejs.org.

\n

After 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.

\n

Developing

\n

There are several gulp tasks that are used for generating different builds:

\n
    \n
  • gulp dev - Serves files with BrowserSync server, watches & automatically refreshes connected browsers on changes, generates non-minified but concatenated styles & scripts from the dragular source.
  • \n
  • gulp dev:docs - Does exactly the same as gulp dev, except it works with the documentation source.
  • \n
  • gulp build - Concatenates and minifies dragular source files.
  • \n
  • gulp build:docs - Concatenates and minifies documentation source files.
  • \n
\n

Linting

\n
    \n
  • gulp lint & gulp lint:docs - Lint JavaScript files.
  • \n
\n

Making a pull request

\n

Once that is ready, make your changes and submit a Pull Request:

\n
    \n
  • Send 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.

    \n
  • \n
  • Ensure changes are jshint validated. Our JSHint configuration file is provided in the repository and you should check against it before submitting.

    \n
  • \n
  • Only 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.

    \n
  • \n
\n

Dependencies for building from source and running tests:

\n

Coding style preferences are not contributions

\n

If 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.

\n

I don't really like git / node.js, but I can fix this bug

\n

That 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");}]); /***/ } diff --git a/docs/dist/examples.min.js b/docs/dist/examples.min.js index 9b3757a4..6ae87fe7 100644 --- a/docs/dist/examples.min.js +++ b/docs/dist/examples.min.js @@ -1,5 +1,5 @@ !function(e,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var t=n();for(var o in t)("object"==typeof exports?exports:e)[o]=t[o]}}(this,function(){return function(e){function n(o){if(t[o])return t[o].exports;var i=t[o]={exports:{},id:o,loaded:!1};return e[o].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}var t={};return n.m=e,n.c=t,n.p="",n(0)}([function(e,n,t){"use strict";var o=t(1),i=t(4),r=t(5),l=t(6),a=t(7),c=t(8),s=t(9),d=t(10),m=t(11),u=t(12),p=t(13),v=t(14),g=t(15),h=t(16),f=t(17),b=t(18),y=t(19),x=t(20),I=t(21),w=t(22),S=t(23),M=t(24),$=t(25),q=t(26),C=t(27),B=t(28),k=t(29);t(30),angular.module("examplesApp",[o,"templates","ui.router"]).config(i).controller("Basic",r).controller("BasicModel",l).controller("BoundingBox",a).controller("BoundingBoxLockX",c).controller("BoundingBoxLockY",s).controller("Copy",d).controller("CopyModel",m).controller("CustomClasses",u).controller("DifferentOptionsModel",p).controller("Directive",v).controller("DirectiveModel",g).controller("DragOverEvents",h).controller("Events",f).controller("Handle",b).controller("IsContainerModel",y).controller("NameSpaces",x).controller("NestedNgRepeat",I).controller("NestedNgRepeatWithModel",w).controller("NgRepeat",S).controller("NgRepeatFilteredWithModel",M).controller("NgRepeatWithModel",$).controller("RemoveOnSpill",q).controller("RemoveOnSpillWithModel",C).controller("RevertOnSpill",B).controller("ScrollingDrag",k).controller("ExAppCtrl",["$scope",function(e){e.examplesList=[{template:"docsInstall/docsInstall.html",link:"docsInstall",title:"Installation"},{template:"exampleBasic/exampleBasic.html",link:"exampleBasic",title:"Basic"},{template:"exampleBasicWithModel/exampleBasicWithModel.html",link:"exampleBasicWithModel",title:"Basic - with model"},{template:"exampleDifferentOptionsWithModel/exampleDifferentOptionsWithModel.html",link:"exampleDifferentOptionsWithModel",title:"Different options - with model"},{template:"exampleDirective/exampleDirective.html",link:"exampleDirective",title:"Directive"},{template:"exampleDirectiveWithModel/exampleDirectiveWithModel.html",link:"exampleDirectiveWithModel",title:"Directive - with model"},{template:"exampleEvents/exampleEvents.html",link:"exampleEvents",title:"Events"},{template:"exampleRemoveOnSpill/exampleRemoveOnSpill.html",link:"exampleRemoveOnSpill",title:"Remove on spill"},{template:"exampleRemoveOnSpillWithModel/exampleRemoveOnSpillWithModel.html",link:"exampleRemoveOnSpillWithModel",title:"Remove on spill - with model"},{template:"exampleRevertOnSpill/exampleRevertOnSpill.html",link:"exampleRevertOnSpill",title:"Revert on spill"},{template:"exampleCopy/exampleCopy.html",link:"exampleCopy",title:"Copy"},{template:"exampleCopyWithModel/exampleCopyWithModel.html",link:"exampleCopyWithModel",title:"Copy - with model"},{template:"exampleHandle/exampleHandle.html",link:"exampleHandle",title:"Handle"},{template:"exampleIsContainerWithModel/exampleIsContainerWithModel.html",link:"exampleIsContainerWithModel",title:"isContainer - with model"},{template:"exampleCustomClasses/exampleCustomClasses.html",link:"exampleCustomClasses",title:"Custom classes"},{template:"exampleNameSpaces/exampleNameSpaces.html",link:"exampleNameSpaces",title:"NameSpaces"},{template:"exampleDragOverEvents/exampleDragOverEvents.html",link:"exampleDragOverEvents",title:"Drag-over events"},{template:"exampleBoundingBox/exampleBoundingBox.html",link:"exampleBoundingBox",title:"BoundingBox"},{template:"exampleBoundingBoxLockX/exampleBoundingBoxLockX.html",link:"exampleBoundingBoxLockX",title:"BoundingBox + LockX"},{template:"exampleBoundingBoxLockY/exampleBoundingBoxLockY.html",link:"exampleBoundingBoxLockY",title:"BoundingBox + LockY"},{template:"exampleNgRepeat/exampleNgRepeat.html",link:"exampleNgRepeat",title:"ngRepeat"},{template:"exampleNgRepeatWithModel/exampleNgRepeatWithModel.html",link:"exampleNgRepeatWithModel",title:"ngRepeat - with model"},{template:"exampleNgRepeatFilteredWithModel/exampleNgRepeatFilteredWithModel.html",link:"exampleNgRepeatFilteredWithModel",title:"Filtered ngRepeat - with model"},{template:"exampleNestedNgRepeat/exampleNestedNgRepeat.html",link:"exampleNestedNgRepeat",title:"Nested ngRepead"},{template:"exampleNestedNgRepeatWithModel/exampleNestedNgRepeatWithModel.html",link:"exampleNestedNgRepeatWithModel",title:"Nested ngRepead - with model"},{template:"exampleScrollingDrag/exampleScrollingDrag.html",link:"exampleScrollingDrag",title:"Scrolling drag"}],e.highlightCode=function(){if(document.getElementsByTagName("code").length)for(var e=document.getElementsByTagName("code"),n=e.length-1;n>=0;n--)hljs.highlightBlock(e[n])};var n;e.toggleSidebar=function(){n||(n=angular.element(document.getElementById("rowOffcanvas"))),n.toggleClass("active")}}])},function(e,n,t){"use strict";var o=t(2),i=t(3);e.exports="dragularModule",angular.module("dragularModule",[]).factory("dragularService",i).directive("dragular",o)},function(e,n){"use strict";var t=function(e){return{restrict:"A",link:function(n,t,o){function i(e){try{return JSON.parse(e)}catch(n){return}}var r=n.$eval(o.dragular)||i(o.dragular)||{};o.dragularModel&&(r.containersModel=o.dragularModel,r.scope||(r.scope=n)),o.dragularNameSpace&&(r.nameSpace=o.dragularNameSpace.split(" ")),o.dragularOnInit&&(r.onInit=n.$eval(o.dragularOnInit)),e(t[0],r)}}};t.$inject=["dragularService"],e.exports=t},function(e,n){"use strict";var t={classesCache:{},containersCtx:{},containers:{},mirror:null,source:null,item:null,copy:null,sourceItem:null,sourceModel:null,sourceFilteredModel:null,target:null,targetCtx:null,targetModel:null,lastDropTarget:null,offsetX:null,offsetY:null,moveX:null,moveY:null,offsetXr:null,offsetYb:null,clientX:null,clientY:null,mirrorWidth:null,mirrorHeight:null,initialSibling:null,currentSibling:null,initialIndex:null,currentIndex:null,tempModel:null,dragOverEvents:{},lastElementBehindCursor:null,grabbed:null},o=function(e,n){function o(o,m){function b(){1!==arguments.length||R(o)||angular.isElement(o)||o[0]||"string"==typeof o?"string"==typeof o&&(pe=document.querySelectorAll(o)):(ve=o||{},pe=[]),ue=ve.copyOptions?angular.copy(ve):ve}function I(){var e=angular.extend({},be,ue);angular.extend(ue,e),ue.classes&&(e=angular.extend({},he,ue.classes),angular.extend(ue.classes,e)),ue.eventNames&&(e=angular.extend({},fe,ue.eventNames),angular.extend(ue.eventNames,e))}function $(){f(ue.boundingBox)||(ue.boundingBox=!1),ue.containers&&(pe=ue.containers),ue.containers=i(pe,!1,ue.scope),ue.containersModel=i(ue.containersModel,!0,ue.scope),R(ue.containersFilteredModel)?ue.containersFilteredModel=R(ue.containersFilteredModel[0])?ue.containersFilteredModel:[ue.containersFilteredModel]:ue.containersFilteredModel=[],ue.nameSpace||(ue.nameSpace=["dragularCommon"]),R(ue.nameSpace)||(ue.nameSpace=[ue.nameSpace]),ue.nameSpace.forEach(function(e){t.containers[e]||(t.containers[e]=[],t.containersCtx[e]=[]);for(var n=Z(ue).length,o=t.containers[e].length,i=0;ir.left+t.offsetX&&or.top+t.offsetY&&it)return i;if(!a&&r.top>o)return i}return null}function r(){var e=n.getBoundingClientRect();return l(a?t>e.left+p(e)/2:o>e.top+v(e)/2)}function l(e){return e?h(n):n}var a="horizontal"===ue.direction;return n!==e?r():i()}function _(e,n,t){var o,i=e||{},r=i.className;return i.className+=" "+ue.classes.hide,o=k.elementFromPoint(n,t),i.className=r,o}function K(e){if(!e)return!1;for(var n=ue.nameSpace.length;n--;)if(t.containers[ue.nameSpace[n]].indexOf(e)!==-1)return!0;return ue.isContainer(e)?(t.tempModel=ue.isContainerModel(e),!0):(t.tempModel=null,!1)}function Z(e){return ne("containers",e)}function ee(e){return ne("containersModel",e,!0)}function ne(e,n,o){return N(n[e])?i(n[e](n===ue?ye:null,t),o,n.scope):n[e]}function te(e){if(ye.dragging){var n=arguments.length>0?e:ge(ue.revertOnSpill),o=S(t.item),i=z(o);i||t.copy||!n||t.source.insertBefore(t.item,t.initialSibling),!t.sourceModel||t.copy||n?ue.scope&&(i||n)&&ue.scope.$emit(ue.eventNames.dragularcancel,t.item,t.source,t.sourceModel,t.initialIndex):ie(t.item,o),(!t.sourceModel||t.copy||n||i)&&le()}}function oe(e){if(F(),ye.dragging){e.originalEvent&&(e=e.originalEvent),t.clientX=w("clientX",e),t.clientY=w("clientY",e);var n=_(t.mirror,t.clientX,t.clientY),o=P(n,t.clientX,t.clientY);o&&(t.copy&&ge(ue.copySortSource)||!t.copy||o!==t.source)?ie(t.item,o):ge(ue.removeOnSpill)?re():te(),t.target=null,t.lastElementBehindCursor&&C(t.lastElementBehindCursor,t.dragOverEvents.dragularrelease,n),ue.scope&&ue.scope.$emit(ue.eventNames.dragularrelease,t.item,t.source,e)}}function ie(o,i){function l(){if(Z(ue).forEach(function(e){r(e,"off","mousedown",j),r(e,"on","mousedown",j)}),ue.compileItemOnDrop){var e=angular.element(i).scope?angular.element(i).scope():ue.scope;e&&e.$applyAsync(function(){var r=n(t.copy?a.cloneNode(!0):a)(e);o.parentNode===i&&i.removeChild(o),i.insertBefore(r[0],c),le()})}ue.scope&&(z(i)?ue.scope.$emit(ue.eventNames.dragularcancel,o,t.source,t.sourceModel,t.initialIndex):ue.scope.$emit(ue.eventNames.dragulardrop,o,i,t.source,t.sourceModel,t.initialIndex,t.targetModel,s)),ue.compileItemOnDrop||le()}if(!o)return void le();var a=t.sourceItem,c=t.currentSibling,s=q(o,i);t.copy&&i===t.source&&S(o)&&ge(ue.copySortSource)&&o.parentNode.removeChild(t.sourceItem),t.sourceModel&&!z(i)?(t.targetCtx&&t.targetCtx.fm&&(s=t.targetCtx.m.indexOf(t.targetCtx.fm[s])),t.sourceFilteredModel&&(t.initialIndex=t.sourceModel.indexOf(t.sourceFilteredModel[t.initialIndex])),e.$applyAsync(function(){t.sourceModel&&(i===t.source?t.sourceModel.splice(s,0,t.sourceModel.splice(t.initialIndex,1)[0]):(t.dropElmModel=t.copy&&!ue.dontCopyModel?angular.copy(t.sourceModel[t.initialIndex]):t.sourceModel[t.initialIndex],t.tempModel?t.targetModel=t.tempModel:t.targetModel=t.targetCtx&&t.targetCtx.m||t.sourceModel,o.parentNode.removeChild(o),t.copy||t.sourceModel.splice(t.initialIndex,1),t.targetModel&&t.targetModel.splice(s,0,t.dropElmModel)),S(o)&&o.parentNode.removeChild(o),l())})):l()}function re(){if(ye.dragging){var n=S(t.item);n&&n.removeChild(t.item),t.sourceModel&&e.$applyAsync(function(){t.sourceModel.splice(t.initialIndex,1),le()}),ue.scope&&ue.scope.$emit(t.copy?ue.eventNames.dragularcancel:ue.eventNames.dragularremove,t.item,n,t.sourceModel,t.initialIndex),t.sourceModel||le()}}function le(){F(),de(),t.item&&x(t.item,ue.classes.transit),ye.dragging=!1,ge(ue.removeOnSpill)===!0&&U(),ue.scope&&(t.lastDropTarget&&ue.scope.$emit(ue.eventNames.dragularout,t.item,t.lastDropTarget,t.source),ue.scope.$emit(ue.eventNames.dragulardragend,t.item)),t.source=t.item=t.sourceItem=t.initialSibling=t.currentSibling=t.sourceModel=null,t.initialIndex=t.currentIndex=t.lastDropTarget=t.tempModel=t.targetModel=null,t.dropElmModel=t.targetCtx=t.copy=t.moveX=t.moveY=null}function ae(){O(!0),ce(ue.containers),oe({})}function ce(n){e.$applyAsync(function(){var e=R(n)?n:c(n);e.forEach(function(e){angular.forEach(ue.nameSpace,function(n){var o;o=t.containers[n].indexOf(e),t.containers[n].splice(o,1),t.containersCtx[n].splice(o,1)})})})}function se(e){if(t.target){e.originalEvent&&(e=e.originalEvent);var n=t.target.scrollTop;t.target.scrollTop+=e.deltaY,n!==t.target.scrollTop&&(e.stopPropagation(),e.preventDefault())}}function de(){t.mirror&&(x(k.body,ue.classes.unselectable),r(E,"off","mousemove",H),r(t.mirror,"off","wheel",se),S(t.mirror)&&t.mirror.parentNode.removeChild(t.mirror),t.mirror=null)}function me(e){i(e,!0,ue.scope)}var ue,pe=o||[],ve=m||{},ge=B,he={mirror:"gu-mirror",hide:"gu-hide",unselectable:"gu-unselectable",transit:"gu-transit"},fe={dragularenter:"dragularenter",dragularleave:"dragularleave",dragularrelease:"dragularrelease",dragularcloned:"dragularcloned",dragulardrag:"dragulardrag",dragularcancel:"dragularcancel",dragulardrop:"dragulardrop",dragularremove:"dragularremove",dragulardragend:"dragulardragend",dragularshadow:"dragularshadow",dragularover:"dragularover",dragularout:"dragularout"},be={copyOptions:!1,classes:he,eventNames:fe,containers:!1,containersModel:!1,containersFilteredModel:!1,isContainer:l,isContainerModel:g,isContainerAccepts:a,moves:a,accepts:a,canBeAccepted:a,copy:!1,copySortSource:!1,dontCopyModel:!1,invalid:l,revertOnSpill:!1,removeOnSpill:!1,lockX:!1,lockY:!1,boundingBox:!1,mirrorContainer:k.body,ignoreInputTextSelection:!0,compileItemOnDrop:!1,onInit:!1},ye={containers:t.containers,containersCtx:t.containersCtx,sanitizeContainersModel:me,sanitizeContainers:i,isContainer:K,start:W,end:A,cancel:te,remove:re,destroy:ae,dragging:!1};return b(),I(),$(),O(),ue.onInit&&ue.onInit(ye,ue),ye}function i(e,n,t){if(N(e))return e;if(R(e))return n?R(e[0])?e:[e]:e;if("string"==typeof e&&t){var o=t.$eval(e);return N(o)?o:function(){return t.$eval(e)}}return e?c(e):[]}function r(e,n,t,o){var i={mouseup:"touchend",mousedown:"touchstart",mousemove:"touchmove"},r={mouseup:"pointerup",mousedown:"pointerdown",mousemove:"pointermove"},l={mouseup:"MSPointerUp",mousedown:"MSPointerDown",mousemove:"MSPointerMove"},a=angular.element(e);if(e.addEventListener){var c={on:"addEventListener",off:"removeEventListener"};e[c[n]](t,o,{passive:!1}),e[c[n]](i[t],o,{passive:!1})}else"undefined"!=typeof navigator&&navigator.pointerEnabled&&r[t]?a[n](r[t],o):"undefined"!=typeof navigator&&navigator.msPointerEnabled&&l[t]?a[n](l[t],o):i[t]&&a[n](i[t],o),a[n](t,o)}function l(){return!1}function a(){return!0}function c(e,n){return R(e)?e:e.length?Array.prototype.slice.call(e,n):[e]}function s(e){if(e.touches)return e.touches.length;if(e.originalEvent&&e.originalEvent.touches)return e.originalEvent.touches.length;if(void 0!==e.which&&0!==e.which)return e.which;if(void 0!==e.buttons)return e.buttons;var n=e.button;return void 0!==n?1&n?1:2&n?3:4&n?2:0:void 0}function d(e){e.originalEvent&&(e=e.originalEvent),t.grabbed&&e.preventDefault()}function m(e,n){return"undefined"!=typeof window[n]?window[n]:E.clientHeight?E[e]:k.body[e]}function u(e){var n=e.getBoundingClientRect(),t=m("scrollTop","pageYOffset"),o=m("scrollLeft","pageXOffset");return{left:n.left+o,right:n.right+o,top:n.top+t,bottom:n.bottom+t}}function p(e){return e.width||e.right-e.left}function v(e){return e.height||e.bottom-e.top}function g(){return{}}function h(e){function n(){var n=e;do n=n.nextSibling;while(n&&1!==n.nodeType);return n}if(e)return e.nextElementSibling||n()}function f(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName}function b(e){var n=t.classesCache[e];return n?n.lastIndex=0:t.classesCache[e]=n=new RegExp("(?:^|\\s)"+e+"(?:\\s|$)","g"),n}function y(e,n){var t=e.className;t.length?b(n).test(t)||(e.className+=" "+n):e.className=n}function x(e,n){e.className=e.className.replace(b(n)," ").trim()}function I(e){return e.targetTouches&&e.targetTouches.length?e.targetTouches[0]:e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e}function w(e,n){var t=I(n),o={pageX:"clientX",pageY:"clientY"};return e in o&&!(e in t)&&o[e]in t&&(e=o[e]),!t.type||t.type.indexOf("touch")<0?t[e]:t.type.indexOf("end")===-1&&t.originalEvent.touches[0][e.replace("client","page")]}function S(e){return e.parentNode===document?null:e.parentNode}function M(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName||"SELECT"===e.tagName||$(e)}function $(e){return!!e&&("false"!==e.contentEditable&&("true"===e.contentEditable||$(S(e))))}function q(e,n){return Array.prototype.indexOf.call(angular.element(n).children(),e)}function C(e,n,o){e&&(t.extra=o,e.dispatchEvent?e.dispatchEvent(n):e.fireEvent("on"+n.eventType,n))}function B(e,n,o){return N(e)?!!e.apply(o||this,n||t):!!e}var k=document,E=k.documentElement,R=Array.isArray,N=angular.isFunction;return o.cleanEnviroment=function(){t.classesCache={},t.containersCtx={},t.containers={},t.mirror=void 0},o.shared=t,o};o.$inject=["$rootScope","$compile"],e.exports=o},function(e,n){"use strict";var t=function(e,n){n.otherwise("/home");var t,o=function(e,n,o){n.link?o.cancel(t):t=o(function(){e.go("docs.detail",{link:"docsInstall"})},0)};o.$inject=["$state","$stateParams","$timeout"],e.state("home",{url:"/home",templateUrl:"partials/partial-home.html"}).state("docs",{url:"/docs",templateUrl:"partials/partial-docs.html",controller:o}).state("docs.detail",{url:"/:link",templateUrl:function(e){return e.link+"/"+e.link+".html"},controller:o}).state("contribute",{url:"/contribute",templateUrl:"partials/partial-contribute.html"})};t.$inject=["$stateProvider","$urlRouterProvider"],e.exports=t},function(e,n){"use strict";var t=function(e,n){n.cleanEnviroment(),n(".containerVertical")};t.$inject=["$element","dragularService"],e.exports=t},function(e,n){"use strict";var t=function(e,n,t){e.items1=[{content:"Move me, but you can only drop me in one of these containers."},{content:"If you try to drop me somewhere other than these containers, I'll just come back."},{content:"Item 3"},{content:"Item 4"}],e.items2=[{content:"Item 5"},{content:"Item 6"},{content:"Item 7"},{content:"Item 8"}];var o=n.children().eq(0).children();t.cleanEnviroment(),t([o[0],o[1]],{containersModel:[e.items1,e.items2]})};t.$inject=["$scope","$element","dragularService"],e.exports=t},function(e,n){"use strict";var t=function(e,n){var t=e[0];n.cleanEnviroment(),n(e.children(),{boundingBox:t})};t.$inject=["$element","dragularService"],e.exports=t},function(e,n){"use strict";var t=function(e,n){var t=e.children().children()[0];n.cleanEnviroment(),n(t,{boundingBox:t,lockX:!0})};t.$inject=["$element","dragularService"],e.exports=t},function(e,n){"use strict";var t=function(e,n){var t=e.children().children()[0];n.cleanEnviroment(),n(t,{boundingBox:t,lockY:!0})};t.$inject=["$element","dragularService"],e.exports=t},function(e,n){"use strict";var t=function(e,n){n.cleanEnviroment(),n(e.children(),{copy:!0})};t.$inject=["$element","dragularService"],e.exports=t},function(e,n){"use strict";var t=function(e,n,t){e.items1=[{content:"Move me, and make copy on drop."},{content:"If you try to drop me somewhere other than these containers, I'll just come back."},{content:"Item 3"},{content:"Item 4"}],e.items2=[{content:"Item 5"},{content:"Item 6"},{content:"Item 7"},{content:"Item 8"}];var o=n.children().eq(0).children();t.cleanEnviroment(),t([o[0],o[1]],{containersModel:[e.items1,e.items2],copy:!0})};t.$inject=["$scope","$element","dragularService"],e.exports=t},function(e,n){"use strict";var t=function(e,n){n.cleanEnviroment(),n(e.children(),{classes:{mirror:"custom-green-mirror"}})};t.$inject=["$element","dragularService"],e.exports=t},function(e,n){"use strict";var t=function(e,n,t){function o(e,n,t){if(t===i||t===n)return!0}e.items1=[{content:"Move me, but you can only drop me in one of these containers."},{content:"If you try to drop me somewhere other than these containers, I'll just come back."},{content:"Item 3"},{content:"Item 4"}],e.items2=[{content:"Item 5"},{content:"Item 6"},{content:"Item 7"},{content:"Item 8"}];var i=document.querySelector("#containerLeft"),r=document.querySelector("#containerRight");t.cleanEnviroment(),t([i],{containersModel:[e.items1],copy:!0,copySortSource:!0,accepts:o}),t([r],{containersModel:[e.items2],removeOnSpill:!0,accepts:o})};t.$inject=["$scope","$element","dragularService"],e.exports=t},function(e,n){"use strict";var t=function(e){e.dragularOptions={classes:{mirror:"custom-green-mirror"},nameSpace:"same"}};t.$inject=["$scope"],e.exports=t},function(e,n){"use strict";var t=function(e){e.items1=[{content:"Move me, and make copy on drop."},{content:"If you try to drop me somewhere other than these containers, I'll just come back."},{content:"Item 3"},{content:"Item 4"}],e.items2=[{content:"Item 5"},{content:"Item 6"},{content:"Item 7"},{content:"Item 8"}],e.dragularOptions={containersModel:e.items1,classes:{mirror:"custom-green-mirror"},nameSpace:"common"}};t.$inject=["$scope"],e.exports=t},function(e,n){"use strict";var t=function(e,n){function t(e){e.on("dragularenter",function(t){e[0]===t.target&&e.addClass(n.shared.extra?"gu-over-accept":"gu-over-decline")}),e.on("dragularleave dragularrelease",function(t){(e[0]===t.target&&n.shared.extra&&n.shared.extra.parentElement!==t.target||"dragularrelease"===t.type)&&(e.removeClass("gu-over-accept"),e.removeClass("gu-over-decline"))})}n.cleanEnviroment(),n([e.children()[0],e.children()[2]],{nameSpace:"apples"}),n([e.children()[1],e.children()[3]],{nameSpace:"oranges"}),angular.forEach(e.children(),function(e){t(angular.element(e))});var o=angular.element(document.getElementsByClassName("notContainer"));o.on("dragularenter",function(){o.addClass("gu-over")}),o.on("dragularleave dragularrelease",function(){o.removeClass("gu-over")})};t.$inject=["$element","dragularService"],e.exports=t},function(e,n){"use strict";var t=function(e,n,t,o){function i(e){return function(){}}t.cleanEnviroment();t(n.children(),{scope:e});e.$on("dragulardrag",function(e,n){e.stopPropagation(),n.className=n.className.replace(" ex-moved","")}),e.$on("dragulardrop",function(e,n){e.stopPropagation(),o(function(){n.className+=" ex-moved"},0)}),e.$on("dragularcloned",i("cloned")),e.$on("dragulardrag",i("drag")),e.$on("dragularcancel",i("cancel")),e.$on("dragulardrop",i("drop")),e.$on("dragularremove",i("remove")),e.$on("dragulardragend",i("dragend")),e.$on("dragularshadow",i("shadow"))};t.$inject=["$scope","$element","dragularService","$timeout"],e.exports=t},function(e,n){"use strict";var t=function(e,n){n.cleanEnviroment(),n(e.children(),{moves:function(e,n,t){return t.classList.contains("handle")}})};t.$inject=["$element","dragularService"],e.exports=t},function(e,n){"use strict";var t=function(e,n,t){e.items1=[{content:"Move me, but you can only drop me in one of these containers."},{content:"If you try to drop me somewhere other than these containers, I'll just come back."},{content:"Item 3"},{content:"Item 4"}],e.cartModel=[];var o=document.querySelector("#containerLeft");t.cleanEnviroment(),t([o],{containersModel:[e.items1],copy:!0,isContainer:function(e){return"cart"===e.id},isContainerModel:function(){return e.cartModel}}),e.removeItem=function(){var n=e.cartModel.indexOf(this.item);e.cartModel.splice(n,1)}};t.$inject=["$scope","$element","dragularService"],e.exports=t},function(e,n){"use strict";var t=function(e,n){n.cleanEnviroment(),n([e.children()[0],e.children()[2]],{nameSpace:"apples"}),n(e.children()[1],{nameSpace:"oranges"}),n(e.children()[3],{nameSpace:["oranges","apples"]})};t.$inject=["$element","dragularService"],e.exports=t},function(e,n){"use strict";var t=function(e,n,t,o){e(function(){o.cleanEnviroment(),o(t,{nameSpace:"rows",moves:function(e,n,t){return t.classList.contains("row-handle")}}),o(t.children(),{nameSpace:"cells",moves:function(e,n,t){return!t.classList.contains("row-handle")}})},0),n.items=[{items:[{content:"Item a1"},{content:"Item a2"},{content:"Item a3"},{content:"Item a4"}]},{items:[{content:"Item b1"},{content:"Item b2"},{content:"Item b3"},{content:"Item b4"}]},{items:[{content:"Item c1"},{content:"Item c2"},{content:"Item c3"},{content:"Item c4"}]}]};t.$inject=["$timeout","$scope","$element","dragularService"],e.exports=t},function(e,n){"use strict";var t=function(e,n,t,o){e(function(){var e=t.children().eq(0).children(),i=e.children(),r=[];o.cleanEnviroment(),o(e,{moves:function(e,n,t){return t.classList.contains("row-handle")},containersModel:n.items,nameSpace:"rows"});for(var l=0;lInstall\n

download dragular.js and dragular.css from dist folder

\n

OR clone git

\n
\ngit clone http://github.com/luckylooke/dragular.git\n
\n

OR use npm

\n
\n[sudo] npm install dragular\n
\n

OR use bower

\n
\nbower install dragular\n
\n

AND 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
\n

AND put dragularModule into dependency array

\n
\nvar app = angular.module('myApp', ['dragularModule', 'otherDependencies']);\n
\n

DONE :)

\n"),e.put("exampleBasicWithModel/exampleBasicWithModel.html","
\n

Basic - with model

\n \n
\n
\n
\n
{{item.content}}
\n
\n
\n
{{item.content}}
\n
\n
\n
\n
\n
Items1:\n          
{{items1 | json}}
\n
\n
\n
Items2:\n          
{{items2 | json}}
\n
\n
\n
\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"),e.put("exampleBasic/exampleBasic.html","
\n

Basic

\n \n
\n
\n
Move me, but you can only drop me in one of these containers.
\n
If you try to drop me somewhere other than these containers, I'll just come back.
\n
Item 3.
\n
Item 6.
\n
\n
\n
You can drop me in the left container, otherwise I'll stay here.
\n
Try to click me, dragular distinguish drag from click
\n
Item 5.
\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      
\n
\n"),e.put("exampleBoundingBox/exampleBoundingBox.html","
\n

BoundingBox

\n \n
\n
\n
This items cannot cross its example element, just try it your selves.
\n
Item 2.
\n
Item 3.
\n
Item 6.
\n
\n
\n
This items cannot cross its example element, just try it your selves.
\n
Item 4.
\n
Item 5.
\n
\n
\n
\n        \n  dragularService([$element.children(), {\n    boundingBox: $element\n  });\n        \n      
\n
"),e.put("exampleBoundingBoxLockX/exampleBoundingBoxLockX.html",'
\n

BoundingBox and lockX

\n \n
\n
\n
\n
Items are locked in X axis movement and cannot cross its closest parent div.boundingBox, just try it your selves.
\n
item 2
\n
item 3
\n
item 4
\n
\n
\n
\n
\n        \n  dragularService([$element.children()[0].children(), {\n    boundingBox: $element.children()[0],\n    lockX: true\n  });\n        \n      
\n
'),e.put("exampleBoundingBoxLockY/exampleBoundingBoxLockY.html","
\n

BoundingBox and LockY

\n \n
\n
\n
\n
Items are locked in Y axis movement and cannot cross its closest parent div.boundingBox, just try it your selves.
\n
item 2
\n
item 3
\n
item 4
\n
item 5
\n
item 6
\n
\n
\n
\n
\n        \n  dragularService([$element.children()[0].children(), {\n    boundingBox: $element.children()[0],\n    lockY: true\n  });\n        \n      
\n
"),e.put("exampleCopy/exampleCopy.html","
\n

Copy

\n \n
\n
\n
Move me, and make copy on drop.
\n
If you try to drop me somewhere other than these containers, I'll just come back.
\n
\n
\n
You can drop me in the left container, otherwise I'll stay here.
\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"),e.put("exampleCopyWithModel/exampleCopyWithModel.html","
\n

Copy - with model

\n \n
\n
\n
\n
{{item.content}}
\n
\n
\n
{{item.content}}
\n
\n
\n
\n
\n
Items1:\n
\n            {{ items1 | json }}\n          
\n
\n
\n
\n
Items2:\n
\n            {{ items2 | json }}\n          
\n
\n
\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"),e.put("exampleCustomClasses/exampleCustomClasses.html","
\n

Custom classes

\n \n
\n
\n
Move me, but you can only drop me in one of these containers.
\n
If you try to drop me somewhere other than these containers, I'll just come back.
\n
Item 3.
\n
Item 6.
\n
\n
\n
You can drop me in the left container, otherwise I'll stay here.
\n
Item 4.
\n
Item 5.
\n
\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      
\n
\n"),e.put("exampleDifferentOptionsWithModel/exampleDifferentOptionsWithModel.html","
\n

Different options - with model

\n \n
\n
\n
\n
{{item.content}}
\n
\n
\n
{{item.content}}
\n
\n
\n
\n
\n
Items1:\n          
{{items1 | json}}
\n
\n
\n
Items2:\n          
{{items2 | json}}
\n
\n
\n
\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"),e.put("exampleDirective/exampleDirective.html","
\n

Directive

\n \n
\n
\n
Move me, but you can only drop me in one of these containers.
\n
If you try to drop me somewhere other than these containers, I'll just come back.
\n
Item 3.
\n
Item 6.
\n
\n
\n
You can drop me in the left container, otherwise I'll stay here.
\n
Item 4.
\n
Item 5.
\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"),e.put("exampleDirectiveWithModel/exampleDirectiveWithModel.html","
\n

Directive - with model

\n \n
\n
\n
\n
{{item.content}}
\n
\n
\n
{{item.content}}
\n
\n
\n
\n
\n
Items1:\n
{{items1 | json}}
\n
\n
\n
Items2:\n
{{items2 | json}}
\n
\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      
\n
\n"),e.put("exampleDragOverEvents/exampleDragOverEvents.html","
\n

Drag-over events

\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\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
dragularService.shared.itemitem beeing dragged (it is copy of item if copy is enabled via options)
dragularService.shared.sourcesource container item is dragged from
dragularService.shared.sourceModelsource container model representation if model was porvided
dragularService.shared.initialIndexoriginal index of item, can be used to get item model from sourceModel
dragularService.shared.extracontains accepting information (boolean) on dragenter, element drag is leaving to on dragleave and element behind the cursor on dragrelease
\n
\n\n

Try to drag over the not-container too.

\n
\n
\n
apples and oranges cannot be mixed
\n
apple 2
\n
apple 3
\n
apple 4
\n
\n
\n
orange 1
\n
orange 2
\n
orange 3
\n
orange 4
\n
\n
\n
apple 5
\n
apple 6
\n
apple 7
\n
apple 8
\n
\n
\n
orange 5
\n
orange 6
\n
orange 7
\n
orange 8
\n
\n
\n
Test active class on NOT container.
\n\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  
\n
\n"),e.put("exampleEvents/exampleEvents.html","
\n

Events

\n \n
\n
\n
Move me, but you can only drop me in one of these containers.
\n
If you try to drop me somewhere other than these containers, I'll just come back.
\n
Item 3.
\n
Item 6.
\n
\n
\n
You can drop me in the left container, otherwise I'll stay here.
\n
Item 4.
\n
Item 5.
\n
\n
\n
\n        \n.controller('Events', ['$scope', '$element', 'dragularService', '$timeout', function TodoCtrl($scope, $element, dragularService, $timeout) {\n    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'));\n    $scope.$on('dragulardrag', myFn('drag'));\n    $scope.$on('dragularcancel', myFn('cancel'));\n    $scope.$on('dragulardrop', myFn('drop'));\n    $scope.$on('dragularremove', myFn('remove'));\n    $scope.$on('dragulardragend', myFn('dragend'));\n    $scope.$on('dragularshadow', myFn('shadow'));\n\n    function myFn(eventName) {\n      return function() {\n        console.log(eventName, arguments);\n      };\n    }\n\n  }]);\n        \n      
\n
\n"),e.put("exampleHandle/exampleHandle.html","
\n

Handle

\n \n
\n
\n
+Move me, but you can use the plus sign to drag me around.
\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      
\n
\n"),e.put("exampleIsContainerWithModel/exampleIsContainerWithModel.html","
\n

isContainer - with model

\n \n
\n
\n
\n
{{item.content}}
\n
\n
\n
{{item.content}}\n
\n
\n
\n
\n
\n
Items1:\n          
{{items1 | json}}
\n
\n
\n
Cart:\n          
{{cartModel | json}}
\n
\n
\n
\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
\n"), -e.put("exampleNameSpaces/exampleNameSpaces.html","
\n

NameSpaces

\n \n
\n
\n
try to mix oranges and apples
\n
apple 2
\n
apple 3
\n
apple 4
\n
\n
\n
orange 1
\n
orange 2
\n
orange 3
\n
orange 4
\n
\n
\n
apple 5
\n
apple 6
\n
apple 7
\n
apple 8
\n
\n
\n
mixed 1
\n
mixed 2
\n
mixed 3
\n
mixed 4
\n
\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
"),e.put("exampleNestedNgRepeat/exampleNestedNgRepeat.html","
\n

Nested ngRepeat

\n \n
\n
\n
Row {{$index}}
\n
{{item.content}}
\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"),e.put("exampleNestedNgRepeatWithModel/exampleNestedNgRepeatWithModel.html","
\n

Nested ngRepeat - with model

\n \n
\n
\n
\n
\n
Row {{::$index}}
\n
\n
{{item.content}}
\n
\n
\n
\n
\n
\n
\n
\n            
Items:\n
{{items | json}}
\n
\n
\n
\n
\n
\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"),e.put("exampleNgRepeat/exampleNgRepeat.html","
\n

ngRepeat

\n \n
\n
\n
\n {{item.content}}\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
\n"),e.put("exampleNgRepeatFilteredWithModel/exampleNgRepeatFilteredWithModel.html","
\n

Filtered ngRepeat - with model

\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!

\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n
{{item.content}}
\n
\n
\n
{{item.content}}
\n
\n
\n
\n
\n
Items1:\n          
{{items1 | json}}
\n
\n
\n
Items2:\n          
{{items2 | json}}
\n
\n
\n
\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"),e.put("exampleNgRepeatWithModel/exampleNgRepeatWithModel.html","
\n

ngRepeat - with model

\n \n
\n
\n
\n
\n {{item.content}}\n \n \n
\n
\n
\n
\n
\n
Items:\n
{{items | json}}
\n
\n
\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"),e.put("exampleRemoveOnSpill/exampleRemoveOnSpill.html","
\n

Remove on spill

\n \n
\n
\n
Move me, but you can only drop me in containers.
\n
If you try to drop me somewhere other than containers, I'll die a fiery death.
\n
Item 3.
\n
Item 6.
\n
Item 4.
\n
Item 5.
\n
\n \n
\n
\n        \n  dragularService([document.getElementById(single)], { removeOnSpill: true });\n        \n      
\n
"),e.put("exampleRemoveOnSpillWithModel/exampleRemoveOnSpillWithModel.html","
\n

Remove on spill - with model

\n \n
\n
\n
\n
{{item.content}}
\n
\n
\n
{{item.content}}
\n
\n
\n
\n
\n
Items1:\n          
{{items1 | json}}
\n
\n
\n
Items2:\n          
{{items2 | json}}
\n
\n
\n
\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"),e.put("exampleRevertOnSpill/exampleRevertOnSpill.html","
\n

Revert on spill

\n \n
\n
\n
Move me, but you can only drop me in one of these containers.
\n
If you try to drop me somewhere other than these containers, I'll just come back.
\n
Item 3.
\n
Item 6.
\n
\n
\n
You can drop me in the left container, otherwise I'll stay here.
\n
Item 4.
\n
Item 5.
\n
\n
\n
\n        \n  dragularService([document.getElementById(left), document.getElementById(right)], { revertOnSpill: true });\n        \n      
\n
"),e.put("exampleScrollingDrag/exampleScrollingDrag.html",'
\n

Scrolling drag

\n \n
\n
\n
up
\n
\n
Item 1.
\n
Item 2.
\n
Item 3.
\n
Item 4.
\n
Item 5.
\n
Item 6.
\n
Item 7.
\n
Item 9.
\n
Item 10.
\n
Item 11.
\n
Item 12.
\n
Item 13.
\n
\n
down
\n
\n
\n
\n
\n
Item 1.
\n
Item 2.
\n
Item 3.
\n
Item 4.
\n
Item 5.
\n
Item 6.
\n
Item 7.
\n
Item 9.
\n
Item 10.
\n
Item 11.
\n
Item 12.
\n
Item 13.
\n
\n
\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'),e.put("partials/partial-contribute.html",'
\n
\n
\n \n
\n
\n
\n'),e.put("partials/partial-docs.html",'
\n
\n \n \n
\n

\n \n

\n \n
\n
\n \n
\n \n
\n'),e.put("partials/partial-home.html",'
\n
\n \n
\n
\n

DRAGULAR

\n

Angular drag&drop based on dragula.

\n

Live examples in docs

\n
\n
\n
\n

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

\n

Inspiration

\n

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

\n

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

\n

Differences of dragular (against dragula)

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

Todo

\n
    \n
  • improve docs
  • \n
\n

Features

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

For installation, usage and examples go to docs

\n
\n
\n \n
\n \n
\n \n
\n'),e.put("partials/autogenerated/contribute.html",'

How to contribute

\n

It'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.

\n

Before contributing, please read the code of conduct.

\n

Reporting issues

\n

GitHub 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:

\n

1. 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.

\n

2. Not sure if it's a bug?. Then please ask via issues and tag it [question].

\n

3. 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.

\n

4. 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)

\n

5. 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.

\n

Dev vs. Master

\n

The 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.

\n

Making Changes

\n

To take advantage of our npm build script and jshint config it will be easiest for you if you have node.js installed locally.

\n

You can download node.js from nodejs.org.

\n

After 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.

\n

Developing

\n

There are several gulp tasks that are used for generating different builds:

\n
    \n
  • gulp dev - Serves files with BrowserSync server, watches & automatically refreshes connected browsers on changes, generates non-minified but concatenated styles & scripts from the dragular source.
  • \n
  • gulp dev:docs - Does exactly the same as gulp dev, except it works with the documentation source.
  • \n
  • gulp build - Concatenates and minifies dragular source files.
  • \n
  • gulp build:docs - Concatenates and minifies documentation source files.
  • \n
\n

Linting

\n
    \n
  • gulp lint & gulp lint:docs - Lint JavaScript files.
  • \n
\n

Making a pull request

\n

Once that is ready, make your changes and submit a Pull Request:

\n
    \n
  • Send 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.

    \n
  • \n
  • Ensure changes are jshint validated. Our JSHint configuration file is provided in the repository and you should check against it before submitting.

    \n
  • \n
  • Only 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.

    \n
  • \n
\n

Dependencies for building from source and running tests:

\n

Coding style preferences are not contributions

\n

If 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.

\n

I don't really like git / node.js, but I can fix this bug

\n

That 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'); +e.exports=t},function(e,n){"use strict";var t=function(e,n,t){e.items1=[{content:"Move me, but you can only drop me in containers."},{content:"If you try to drop me somewhere other than containers, I'll die a fiery death."},{content:"Item 3"},{content:"Item 4"}],e.items2=[{content:"You can drop me in the left container."},{content:"Item 6"},{content:"Item 7"},{content:"Item 8"}];var o=n.children().eq(0).children();t.cleanEnviroment(),t([o[0],o[1]],{containersModel:[e.items1,e.items2],removeOnSpill:!0})};t.$inject=["$scope","$element","dragularService"],e.exports=t},function(e,n){"use strict";var t=function(e,n){n.cleanEnviroment(),n(e.children(),{revertOnSpill:!0})};t.$inject=["$element","dragularService"],e.exports=t},function(e,n){"use strict";var t=function(e,n,t){function o(n,t,o,r){r||(r=20),angular.element(n).on("dragularenter",function(){t.scrollTop+=o,i=e(function(){t.scrollTop+=o},r)}),angular.element(n).on("dragularleave dragularrelease",function(){e.cancel(i)})}var i,r=document.getElementById("leftScroll"),l=document.getElementById("rightScroll"),a=document.getElementById("leftTopBar"),c=document.getElementById("leftBottomBar"),s=document.getElementById("rightTopBar"),d=document.getElementById("rightBottomBar");t.cleanEnviroment(),t([r,l]),o(a,r,-5),o(c,r,5),o(s,l,-5),o(d,l,5)};t.$inject=["$interval","$element","dragularService"],e.exports=t},function(e,n){"use strict";e.exports=angular.module("templates",[]).run(["$templateCache",function(e){e.put("docsInstall/docsInstall.html","

Install

\n

download dragular.js and dragular.css from dist folder

\n

OR clone git

\n
\ngit clone http://github.com/luckylooke/dragular.git\n
\n

OR use npm

\n
\n[sudo] npm install dragular\n
\n

OR use bower

\n
\nbower install dragular\n
\n

AND 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
\n

AND put dragularModule into dependency array

\n
\nvar app = angular.module('myApp', ['dragularModule', 'otherDependencies']);\n
\n

DONE :)

\n"),e.put("exampleBasic/exampleBasic.html","
\n

Basic

\n \n
\n
\n
Move me, but you can only drop me in one of these containers.
\n
If you try to drop me somewhere other than these containers, I'll just come back.
\n
Item 3.
\n
Item 6.
\n
\n
\n
You can drop me in the left container, otherwise I'll stay here.
\n
Try to click me, dragular distinguish drag from click
\n
Item 5.
\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      
\n
\n"),e.put("exampleBasicWithModel/exampleBasicWithModel.html","
\n

Basic - with model

\n \n
\n
\n
\n
{{item.content}}
\n
\n
\n
{{item.content}}
\n
\n
\n
\n
\n
Items1:\n          
{{items1 | json}}
\n
\n
\n
Items2:\n          
{{items2 | json}}
\n
\n
\n
\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"),e.put("exampleBoundingBox/exampleBoundingBox.html","
\n

BoundingBox

\n \n
\n
\n
This items cannot cross its example element, just try it your selves.
\n
Item 2.
\n
Item 3.
\n
Item 6.
\n
\n
\n
This items cannot cross its example element, just try it your selves.
\n
Item 4.
\n
Item 5.
\n
\n
\n
\n        \n  dragularService([$element.children(), {\n    boundingBox: $element\n  });\n        \n      
\n
"),e.put("exampleBoundingBoxLockX/exampleBoundingBoxLockX.html",'
\n

BoundingBox and lockX

\n \n
\n
\n
\n
Items are locked in X axis movement and cannot cross its closest parent div.boundingBox, just try it your selves.
\n
item 2
\n
item 3
\n
item 4
\n
\n
\n
\n
\n        \n  dragularService([$element.children()[0].children(), {\n    boundingBox: $element.children()[0],\n    lockX: true\n  });\n        \n      
\n
'),e.put("exampleBoundingBoxLockY/exampleBoundingBoxLockY.html","
\n

BoundingBox and LockY

\n \n
\n
\n
\n
Items are locked in Y axis movement and cannot cross its closest parent div.boundingBox, just try it your selves.
\n
item 2
\n
item 3
\n
item 4
\n
item 5
\n
item 6
\n
\n
\n
\n
\n        \n  dragularService([$element.children()[0].children(), {\n    boundingBox: $element.children()[0],\n    lockY: true\n  });\n        \n      
\n
"),e.put("exampleCopy/exampleCopy.html","
\n

Copy

\n \n
\n
\n
Move me, and make copy on drop.
\n
If you try to drop me somewhere other than these containers, I'll just come back.
\n
\n
\n
You can drop me in the left container, otherwise I'll stay here.
\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"),e.put("exampleCopyWithModel/exampleCopyWithModel.html","
\n

Copy - with model

\n \n
\n
\n
\n
{{item.content}}
\n
\n
\n
{{item.content}}
\n
\n
\n
\n
\n
Items1:\n
\n            {{ items1 | json }}\n          
\n
\n
\n
\n
Items2:\n
\n            {{ items2 | json }}\n          
\n
\n
\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"),e.put("exampleCustomClasses/exampleCustomClasses.html","
\n

Custom classes

\n \n
\n
\n
Move me, but you can only drop me in one of these containers.
\n
If you try to drop me somewhere other than these containers, I'll just come back.
\n
Item 3.
\n
Item 6.
\n
\n
\n
You can drop me in the left container, otherwise I'll stay here.
\n
Item 4.
\n
Item 5.
\n
\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      
\n
\n"),e.put("exampleDifferentOptionsWithModel/exampleDifferentOptionsWithModel.html","
\n

Different options - with model

\n \n
\n
\n
\n
{{item.content}}
\n
\n
\n
{{item.content}}
\n
\n
\n
\n
\n
Items1:\n          
{{items1 | json}}
\n
\n
\n
Items2:\n          
{{items2 | json}}
\n
\n
\n
\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"),e.put("exampleDirective/exampleDirective.html","
\n

Directive

\n \n
\n
\n
Move me, but you can only drop me in one of these containers.
\n
If you try to drop me somewhere other than these containers, I'll just come back.
\n
Item 3.
\n
Item 6.
\n
\n
\n
You can drop me in the left container, otherwise I'll stay here.
\n
Item 4.
\n
Item 5.
\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"),e.put("exampleDirectiveWithModel/exampleDirectiveWithModel.html","
\n

Directive - with model

\n \n
\n
\n
\n
{{item.content}}
\n
\n
\n
{{item.content}}
\n
\n
\n
\n
\n
Items1:\n
{{items1 | json}}
\n
\n
\n
Items2:\n
{{items2 | json}}
\n
\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      
\n
\n"),e.put("exampleDragOverEvents/exampleDragOverEvents.html","
\n

Drag-over events

\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\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
dragularService.shared.itemitem beeing dragged (it is copy of item if copy is enabled via options)
dragularService.shared.sourcesource container item is dragged from
dragularService.shared.sourceModelsource container model representation if model was porvided
dragularService.shared.initialIndexoriginal index of item, can be used to get item model from sourceModel
dragularService.shared.extracontains accepting information (boolean) on dragenter, element drag is leaving to on dragleave and element behind the cursor on dragrelease
\n
\n\n

Try to drag over the not-container too.

\n
\n
\n
apples and oranges cannot be mixed
\n
apple 2
\n
apple 3
\n
apple 4
\n
\n
\n
orange 1
\n
orange 2
\n
orange 3
\n
orange 4
\n
\n
\n
apple 5
\n
apple 6
\n
apple 7
\n
apple 8
\n
\n
\n
orange 5
\n
orange 6
\n
orange 7
\n
orange 8
\n
\n
\n
Test active class on NOT container.
\n\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  
\n
\n"),e.put("exampleEvents/exampleEvents.html","
\n

Events

\n \n
\n
\n
Move me, but you can only drop me in one of these containers.
\n
If you try to drop me somewhere other than these containers, I'll just come back.
\n
Item 3.
\n
Item 6.
\n
\n
\n
You can drop me in the left container, otherwise I'll stay here.
\n
Item 4.
\n
Item 5.
\n
\n
\n
\n        \n.controller('Events', ['$scope', '$element', 'dragularService', '$timeout', function TodoCtrl($scope, $element, dragularService, $timeout) {\n    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'));\n    $scope.$on('dragulardrag', myFn('drag'));\n    $scope.$on('dragularcancel', myFn('cancel'));\n    $scope.$on('dragulardrop', myFn('drop'));\n    $scope.$on('dragularremove', myFn('remove'));\n    $scope.$on('dragulardragend', myFn('dragend'));\n    $scope.$on('dragularshadow', myFn('shadow'));\n\n    function myFn(eventName) {\n      return function() {\n        console.log(eventName, arguments);\n      };\n    }\n\n  }]);\n        \n      
\n
\n"),e.put("exampleHandle/exampleHandle.html","
\n

Handle

\n \n
\n
\n
+Move me, but you can use the plus sign to drag me around.
\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      
\n
\n"),e.put("exampleIsContainerWithModel/exampleIsContainerWithModel.html","
\n

isContainer - with model

\n \n
\n
\n
\n
{{item.content}}
\n
\n
\n
{{item.content}}\n
\n
\n
\n
\n
\n
Items1:\n          
{{items1 | json}}
\n
\n
\n
Cart:\n          
{{cartModel | json}}
\n
\n
\n
\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
\n"), +e.put("exampleNameSpaces/exampleNameSpaces.html","
\n

NameSpaces

\n \n
\n
\n
try to mix oranges and apples
\n
apple 2
\n
apple 3
\n
apple 4
\n
\n
\n
orange 1
\n
orange 2
\n
orange 3
\n
orange 4
\n
\n
\n
apple 5
\n
apple 6
\n
apple 7
\n
apple 8
\n
\n
\n
mixed 1
\n
mixed 2
\n
mixed 3
\n
mixed 4
\n
\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
"),e.put("exampleNestedNgRepeat/exampleNestedNgRepeat.html","
\n

Nested ngRepeat

\n \n
\n
\n
Row {{$index}}
\n
{{item.content}}
\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"),e.put("exampleNestedNgRepeatWithModel/exampleNestedNgRepeatWithModel.html","
\n

Nested ngRepeat - with model

\n \n
\n
\n
\n
\n
Row {{::$index}}
\n
\n
{{item.content}}
\n
\n
\n
\n
\n
\n
\n
\n            
Items:\n
{{items | json}}
\n
\n
\n
\n
\n
\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"),e.put("exampleNgRepeat/exampleNgRepeat.html","
\n

ngRepeat

\n \n
\n
\n
\n {{item.content}}\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
\n"),e.put("exampleNgRepeatFilteredWithModel/exampleNgRepeatFilteredWithModel.html","
\n

Filtered ngRepeat - with model

\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!

\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n
{{item.content}}
\n
\n
\n
{{item.content}}
\n
\n
\n
\n
\n
Items1:\n          
{{items1 | json}}
\n
\n
\n
Items2:\n          
{{items2 | json}}
\n
\n
\n
\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"),e.put("exampleNgRepeatWithModel/exampleNgRepeatWithModel.html","
\n

ngRepeat - with model

\n \n
\n
\n
\n
\n {{item.content}}\n \n \n
\n
\n
\n
\n
\n
Items:\n
{{items | json}}
\n
\n
\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"),e.put("exampleRemoveOnSpill/exampleRemoveOnSpill.html","
\n

Remove on spill

\n \n
\n
\n
Move me, but you can only drop me in containers.
\n
If you try to drop me somewhere other than containers, I'll die a fiery death.
\n
Item 3.
\n
Item 6.
\n
Item 4.
\n
Item 5.
\n
\n \n
\n
\n        \n  dragularService([document.getElementById(single)], { removeOnSpill: true });\n        \n      
\n
"),e.put("exampleRemoveOnSpillWithModel/exampleRemoveOnSpillWithModel.html","
\n

Remove on spill - with model

\n \n
\n
\n
\n
{{item.content}}
\n
\n
\n
{{item.content}}
\n
\n
\n
\n
\n
Items1:\n          
{{items1 | json}}
\n
\n
\n
Items2:\n          
{{items2 | json}}
\n
\n
\n
\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"),e.put("exampleRevertOnSpill/exampleRevertOnSpill.html","
\n

Revert on spill

\n \n
\n
\n
Move me, but you can only drop me in one of these containers.
\n
If you try to drop me somewhere other than these containers, I'll just come back.
\n
Item 3.
\n
Item 6.
\n
\n
\n
You can drop me in the left container, otherwise I'll stay here.
\n
Item 4.
\n
Item 5.
\n
\n
\n
\n        \n  dragularService([document.getElementById(left), document.getElementById(right)], { revertOnSpill: true });\n        \n      
\n
"),e.put("exampleScrollingDrag/exampleScrollingDrag.html",'
\n

Scrolling drag

\n \n
\n
\n
up
\n
\n
Item 1.
\n
Item 2.
\n
Item 3.
\n
Item 4.
\n
Item 5.
\n
Item 6.
\n
Item 7.
\n
Item 9.
\n
Item 10.
\n
Item 11.
\n
Item 12.
\n
Item 13.
\n
\n
down
\n
\n
\n
\n
\n
Item 1.
\n
Item 2.
\n
Item 3.
\n
Item 4.
\n
Item 5.
\n
Item 6.
\n
Item 7.
\n
Item 9.
\n
Item 10.
\n
Item 11.
\n
Item 12.
\n
Item 13.
\n
\n
\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'),e.put("partials/partial-contribute.html",'
\n
\n
\n \n
\n
\n
\n'),e.put("partials/partial-docs.html",'
\n
\n \n \n
\n

\n \n

\n \n
\n
\n \n
\n \n
\n'),e.put("partials/partial-home.html",'
\n
\n \n
\n
\n

DRAGULAR

\n

Angular drag&drop based on dragula.

\n

Live examples in docs

\n
\n
\n
\n

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

\n

Inspiration

\n

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

\n

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

\n

Differences of dragular (against dragula)

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

Todo

\n
    \n
  • improve docs
  • \n
\n

Features

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

For installation, usage and examples go to docs

\n
\n
\n \n
\n \n
\n \n
\n'),e.put("partials/autogenerated/contribute.html",'

How to contribute

\n

It'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.

\n

Before contributing, please read the code of conduct.

\n

Reporting issues

\n

GitHub 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:

\n

1. 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.

\n

2. Not sure if it's a bug?. Then please ask via issues and tag it [question].

\n

3. 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.

\n

4. 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)

\n

5. 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.

\n

Dev vs. Master

\n

The 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.

\n

Making Changes

\n

To take advantage of our npm build script and jshint config it will be easiest for you if you have node.js installed locally.

\n

You can download node.js from nodejs.org.

\n

After 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.

\n

Developing

\n

There are several gulp tasks that are used for generating different builds:

\n
    \n
  • gulp dev - Serves files with BrowserSync server, watches & automatically refreshes connected browsers on changes, generates non-minified but concatenated styles & scripts from the dragular source.
  • \n
  • gulp dev:docs - Does exactly the same as gulp dev, except it works with the documentation source.
  • \n
  • gulp build - Concatenates and minifies dragular source files.
  • \n
  • gulp build:docs - Concatenates and minifies documentation source files.
  • \n
\n

Linting

\n
    \n
  • gulp lint & gulp lint:docs - Lint JavaScript files.
  • \n
\n

Making a pull request

\n

Once that is ready, make your changes and submit a Pull Request:

\n
    \n
  • Send 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.

    \n
  • \n
  • Ensure changes are jshint validated. Our JSHint configuration file is provided in the repository and you should check against it before submitting.

    \n
  • \n
  • Only 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.

    \n
  • \n
\n

Dependencies for building from source and running tests:

\n

Coding style preferences are not contributions

\n

If 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.

\n

I don't really like git / node.js, but I can fix this bug

\n

That 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 43a4cf39..7343c64d 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","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","angular","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","len","getContainers","shLen","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","cloneNode","$emit","dragularcloned","containerIndex","indexOf","domIndexOf","dragulardrag","manualStart","rect","getBoundingClientRect","width","height","getRectWidth","getRectHeight","mirrorContainer","appendChild","body","unselectable","scrollContainer","drop","ungrab","moved","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","compileItemOnDrop","$applyAsync","content","dragulardrop","dropIndex","splice","dropElmModel","dontCopyModel","dragularremove","removeMirrorImage","dragularout","dragulardragend","destroy","removeContainers","all","changes","makeArray","index","before","scrollTop","deltaY","stopPropagation","depSanitize","getBool","dragularover","never","getEmptyObject","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","classList","contains","cartModel","removeItem","items","parentContainers","nestedContainers","push","addItem","$filter","filter1query","filter2query","filteredModel1","filteredModel2","getFilteredModel","filteredModel","filterQuery","$interval","bar","inc","speed","leftScrollContainer","rightScrollContainer","leftTopBar","leftBottomBar","rightTopBar","rightBottomBar","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/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,2DAA2D,4xEAC9ED,EAAeC,IAAI,mDAAmD,o3JACtED,EAAeC,IAAI,mCAAmC,2vDACtDD,EAAeC,IAAI,mCAAmC,6pBACtDD,EAAeC,IAAI,+DAA+D;AAClFD,EAAeC,IAAI,2CAA2C,gjEAC9DD,EAAeC,IAAI,mDAAmD,+wFACtED,EAAeC,IAAI,qEAAqE,85HACxFD,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,kMACtDD,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\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\t__webpack_require__(30);\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', [dragular, 'templates', 'ui.router'])\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)\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('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\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.2 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\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: getEmptyObject, // 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\t\t\t\tif ( !_isArray( o.nameSpace ) ) {\n\t\t\t\t\to.nameSpace = [ o.nameSpace ];\n\t\t\t\t}\n\t\t\t\to.nameSpace.forEach( function eachNameSpace( nameSpace ) {\n\t\t\t\t\tif ( !shared.containers[ nameSpace ] ) {\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\t\t\t\t\tvar len = getContainers( o ).length,\n\t\t\t\t\t\tshLen = shared.containers[ nameSpace ].length;\n\t\t\t\t\tfor ( var i = 0; i < len; i++ ) {\n\t\t\t\t\t\tshared.containers[ nameSpace ][ i + shLen ] = getContainers( o )[ i ];\n\t\t\t\t\t\tshared.containersCtx[ nameSpace ][ i + shLen ] = {\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\tconsole.log( 'usecase?' );\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\tshared.item = context.item.cloneNode( true );\n\t\t\t\t\tshared.copy = true;\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\to.scope.$emit( o.eventNames[ 'dragular' + type ], shared.item, shared.lastDropTarget, shared.source, e );\n\t\t\t\t\t}\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}\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\tif ( 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.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\tconsole.log('release');\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\tif ( isInitialPlacement( target ) ) {\n\t\t\t\t\t\t\to.scope.$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\to.scope.$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\n\t\t\t\t\tif ( !o.compileItemOnDrop ) {\n\t\t\t\t\t\tcleanup();\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 getEmptyObject() {\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 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'));\n\t $scope.$on('dragulardrag', myFn('drag'));\n\t $scope.$on('dragularcancel', myFn('cancel'));\n\t $scope.$on('dragulardrop', myFn('drop'));\n\t $scope.$on('dragularremove', myFn('remove'));\n\t $scope.$on('dragulardragend', myFn('dragend'));\n\t $scope.$on('dragularshadow', myFn('shadow'));\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\n\tmodule.exports = EventsCtrl;\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'use strict'; module.exports = angular.module(\"templates\", []).run([\"$templateCache\", function($templateCache) {$templateCache.put(\"docsInstall/docsInstall.html\",\"

Install

\\n

download dragular.js and dragular.css from dist folder

\\n

OR clone git

\\n
\\ngit clone http://github.com/luckylooke/dragular.git\\n
\\n

OR use npm

\\n
\\n[sudo] npm install dragular\\n
\\n

OR use bower

\\n
\\nbower install dragular\\n
\\n

AND 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
\\n

AND put dragularModule into dependency array

\\n
\\nvar app = angular.module(\\'myApp\\', [\\'dragularModule\\', \\'otherDependencies\\']);\\n
\\n

DONE :)

\\n\");\n\t$templateCache.put(\"exampleBasicWithModel/exampleBasicWithModel.html\",\"
\\n

Basic - with model

\\n \\n
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
\\n
\\n
Items1:\\n          
{{items1 | json}}
\\n
\\n
\\n
Items2:\\n          
{{items2 | json}}
\\n
\\n
\\n
\\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\");\n\t$templateCache.put(\"exampleBasic/exampleBasic.html\",\"
\\n

Basic

\\n \\n
\\n
\\n
Move me, but you can only drop me in one of these containers.
\\n
If you try to drop me somewhere other than these containers, I\\'ll just come back.
\\n
Item 3.
\\n
Item 6.
\\n
\\n
\\n
You can drop me in the left container, otherwise I\\'ll stay here.
\\n
Try to click me, dragular distinguish drag from click
\\n
Item 5.
\\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      
\\n
\\n\");\n\t$templateCache.put(\"exampleBoundingBox/exampleBoundingBox.html\",\"
\\n

BoundingBox

\\n \\n
\\n
\\n
This items cannot cross its example element, just try it your selves.
\\n
Item 2.
\\n
Item 3.
\\n
Item 6.
\\n
\\n
\\n
This items cannot cross its example element, just try it your selves.
\\n
Item 4.
\\n
Item 5.
\\n
\\n
\\n
\\n        \\n  dragularService([$element.children(), {\\n    boundingBox: $element\\n  });\\n        \\n      
\\n
\");\n\t$templateCache.put(\"exampleBoundingBoxLockX/exampleBoundingBoxLockX.html\",\"
\\n

BoundingBox and lockX

\\n \\n
\\n
\\n
\\n
Items are locked in X axis movement and cannot cross its closest parent div.boundingBox, just try it your selves.
\\n
item 2
\\n
item 3
\\n
item 4
\\n
\\n
\\n
\\n
\\n        \\n  dragularService([$element.children()[0].children(), {\\n    boundingBox: $element.children()[0],\\n    lockX: true\\n  });\\n        \\n      
\\n
\");\n\t$templateCache.put(\"exampleBoundingBoxLockY/exampleBoundingBoxLockY.html\",\"
\\n

BoundingBox and LockY

\\n \\n
\\n
\\n
\\n
Items are locked in Y axis movement and cannot cross its closest parent div.boundingBox, just try it your selves.
\\n
item 2
\\n
item 3
\\n
item 4
\\n
item 5
\\n
item 6
\\n
\\n
\\n
\\n
\\n        \\n  dragularService([$element.children()[0].children(), {\\n    boundingBox: $element.children()[0],\\n    lockY: true\\n  });\\n        \\n      
\\n
\");\n\t$templateCache.put(\"exampleCopy/exampleCopy.html\",\"
\\n

Copy

\\n \\n
\\n
\\n
Move me, and make copy on drop.
\\n
If you try to drop me somewhere other than these containers, I\\'ll just come back.
\\n
\\n
\\n
You can drop me in the left container, otherwise I\\'ll stay here.
\\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\t$templateCache.put(\"exampleCopyWithModel/exampleCopyWithModel.html\",\"
\\n

Copy - with model

\\n \\n
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
\\n
\\n
Items1:\\n
\\n            {{ items1 | json }}\\n          
\\n
\\n
\\n
\\n
Items2:\\n
\\n            {{ items2 | json }}\\n          
\\n
\\n
\\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\");\n\t$templateCache.put(\"exampleCustomClasses/exampleCustomClasses.html\",\"
\\n

Custom classes

\\n \\n
\\n
\\n
Move me, but you can only drop me in one of these containers.
\\n
If you try to drop me somewhere other than these containers, I\\'ll just come back.
\\n
Item 3.
\\n
Item 6.
\\n
\\n
\\n
You can drop me in the left container, otherwise I\\'ll stay here.
\\n
Item 4.
\\n
Item 5.
\\n
\\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      
\\n
\\n\");\n\t$templateCache.put(\"exampleDifferentOptionsWithModel/exampleDifferentOptionsWithModel.html\",\"
\\n

Different options - with model

\\n \\n
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
\\n
\\n
Items1:\\n          
{{items1 | json}}
\\n
\\n
\\n
Items2:\\n          
{{items2 | json}}
\\n
\\n
\\n
\\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\t$templateCache.put(\"exampleDirective/exampleDirective.html\",\"
\\n

Directive

\\n \\n
\\n
\\n
Move me, but you can only drop me in one of these containers.
\\n
If you try to drop me somewhere other than these containers, I\\'ll just come back.
\\n
Item 3.
\\n
Item 6.
\\n
\\n
\\n
You can drop me in the left container, otherwise I\\'ll stay here.
\\n
Item 4.
\\n
Item 5.
\\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\t$templateCache.put(\"exampleDirectiveWithModel/exampleDirectiveWithModel.html\",\"
\\n

Directive - with model

\\n \\n
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
\\n
\\n
Items1:\\n
{{items1 | json}}
\\n
\\n
\\n
Items2:\\n
{{items2 | json}}
\\n
\\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      
\\n
\\n\");\n\t$templateCache.put(\"exampleDragOverEvents/exampleDragOverEvents.html\",\"
\\n

Drag-over events

\\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\\n
\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
dragularService.shared.itemitem beeing dragged (it is copy of item if copy is enabled via options)
dragularService.shared.sourcesource container item is dragged from
dragularService.shared.sourceModelsource container model representation if model was porvided
dragularService.shared.initialIndexoriginal index of item, can be used to get item model from sourceModel
dragularService.shared.extracontains accepting information (boolean) on dragenter, element drag is leaving to on dragleave and element behind the cursor on dragrelease
\\n
\\n\\n

Try to drag over the not-container too.

\\n
\\n
\\n
apples and oranges cannot be mixed
\\n
apple 2
\\n
apple 3
\\n
apple 4
\\n
\\n
\\n
orange 1
\\n
orange 2
\\n
orange 3
\\n
orange 4
\\n
\\n
\\n
apple 5
\\n
apple 6
\\n
apple 7
\\n
apple 8
\\n
\\n
\\n
orange 5
\\n
orange 6
\\n
orange 7
\\n
orange 8
\\n
\\n
\\n
Test active class on NOT container.
\\n\\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  
\\n
\\n\");\n\t$templateCache.put(\"exampleEvents/exampleEvents.html\",\"
\\n

Events

\\n \\n
\\n
\\n
Move me, but you can only drop me in one of these containers.
\\n
If you try to drop me somewhere other than these containers, I\\'ll just come back.
\\n
Item 3.
\\n
Item 6.
\\n
\\n
\\n
You can drop me in the left container, otherwise I\\'ll stay here.
\\n
Item 4.
\\n
Item 5.
\\n
\\n
\\n
\\n        \\n.controller(\\'Events\\', [\\'$scope\\', \\'$element\\', \\'dragularService\\', \\'$timeout\\', function TodoCtrl($scope, $element, dragularService, $timeout) {\\n    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\\'));\\n    $scope.$on(\\'dragulardrag\\', myFn(\\'drag\\'));\\n    $scope.$on(\\'dragularcancel\\', myFn(\\'cancel\\'));\\n    $scope.$on(\\'dragulardrop\\', myFn(\\'drop\\'));\\n    $scope.$on(\\'dragularremove\\', myFn(\\'remove\\'));\\n    $scope.$on(\\'dragulardragend\\', myFn(\\'dragend\\'));\\n    $scope.$on(\\'dragularshadow\\', myFn(\\'shadow\\'));\\n\\n    function myFn(eventName) {\\n      return function() {\\n        console.log(eventName, arguments);\\n      };\\n    }\\n\\n  }]);\\n        \\n      
\\n
\\n\");\n\t$templateCache.put(\"exampleHandle/exampleHandle.html\",\"
\\n

Handle

\\n \\n
\\n
\\n
+Move me, but you can use the plus sign to drag me around.
\\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      
\\n
\\n\");\n\t$templateCache.put(\"exampleIsContainerWithModel/exampleIsContainerWithModel.html\",\"
\\n

isContainer - with model

\\n \\n
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
{{item.content}}\\n
\\n
\\n
\\n
\\n
\\n
Items1:\\n          
{{items1 | json}}
\\n
\\n
\\n
Cart:\\n          
{{cartModel | json}}
\\n
\\n
\\n
\\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
\\n\");\n\t$templateCache.put(\"exampleNameSpaces/exampleNameSpaces.html\",\"
\\n

NameSpaces

\\n \\n
\\n
\\n
try to mix oranges and apples
\\n
apple 2
\\n
apple 3
\\n
apple 4
\\n
\\n
\\n
orange 1
\\n
orange 2
\\n
orange 3
\\n
orange 4
\\n
\\n
\\n
apple 5
\\n
apple 6
\\n
apple 7
\\n
apple 8
\\n
\\n
\\n
mixed 1
\\n
mixed 2
\\n
mixed 3
\\n
mixed 4
\\n
\\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\t$templateCache.put(\"exampleNestedNgRepeat/exampleNestedNgRepeat.html\",\"
\\n

Nested ngRepeat

\\n \\n
\\n
\\n
Row {{$index}}
\\n
{{item.content}}
\\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\");\n\t$templateCache.put(\"exampleNestedNgRepeatWithModel/exampleNestedNgRepeatWithModel.html\",\"
\\n

Nested ngRepeat - with model

\\n \\n
\\n
\\n
\\n
\\n
Row {{::$index}}
\\n
\\n
{{item.content}}
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n            
Items:\\n
{{items | json}}
\\n
\\n
\\n
\\n
\\n
\\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\t$templateCache.put(\"exampleNgRepeat/exampleNgRepeat.html\",\"
\\n

ngRepeat

\\n \\n
\\n
\\n
\\n {{item.content}}\\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
\\n\");\n\t$templateCache.put(\"exampleNgRepeatFilteredWithModel/exampleNgRepeatFilteredWithModel.html\",\"
\\n

Filtered ngRepeat - with model

\\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!

\\n
\\n
\\n
\\n \\n
\\n
\\n \\n
\\n
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
\\n
\\n
Items1:\\n          
{{items1 | json}}
\\n
\\n
\\n
Items2:\\n          
{{items2 | json}}
\\n
\\n
\\n
\\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\");\n\t$templateCache.put(\"exampleNgRepeatWithModel/exampleNgRepeatWithModel.html\",\"
\\n

ngRepeat - with model

\\n \\n
\\n
\\n
\\n
\\n {{item.content}}\\n \\n \\n
\\n
\\n
\\n
\\n
\\n
Items:\\n
{{items | json}}
\\n
\\n
\\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\t$templateCache.put(\"exampleRemoveOnSpill/exampleRemoveOnSpill.html\",\"
\\n

Remove on spill

\\n \\n
\\n
\\n
Move me, but you can only drop me in containers.
\\n
If you try to drop me somewhere other than containers, I\\'ll die a fiery death.
\\n
Item 3.
\\n
Item 6.
\\n
Item 4.
\\n
Item 5.
\\n
\\n
\\n
You can drop me in the left container.
\\n
Item 4.
\\n
Item 5.
\\n
\\n
\\n
\\n        \\n  dragularService([document.getElementById(single)], { removeOnSpill: true });\\n        \\n      
\\n
\");\n\t$templateCache.put(\"exampleRemoveOnSpillWithModel/exampleRemoveOnSpillWithModel.html\",\"
\\n

Remove on spill - with model

\\n \\n
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
\\n
\\n
Items1:\\n          
{{items1 | json}}
\\n
\\n
\\n
Items2:\\n          
{{items2 | json}}
\\n
\\n
\\n
\\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\");\n\t$templateCache.put(\"exampleRevertOnSpill/exampleRevertOnSpill.html\",\"
\\n

Revert on spill

\\n \\n
\\n
\\n
Move me, but you can only drop me in one of these containers.
\\n
If you try to drop me somewhere other than these containers, I\\'ll just come back.
\\n
Item 3.
\\n
Item 6.
\\n
\\n
\\n
You can drop me in the left container, otherwise I\\'ll stay here.
\\n
Item 4.
\\n
Item 5.
\\n
\\n
\\n
\\n        \\n  dragularService([document.getElementById(left), document.getElementById(right)], { revertOnSpill: true });\\n        \\n      
\\n
\");\n\t$templateCache.put(\"exampleScrollingDrag/exampleScrollingDrag.html\",\"
\\n

Scrolling drag

\\n \\n
\\n
\\n
up
\\n
\\n
Item 1.
\\n
Item 2.
\\n
Item 3.
\\n
Item 4.
\\n
Item 5.
\\n
Item 6.
\\n
Item 7.
\\n
Item 9.
\\n
Item 10.
\\n
Item 11.
\\n
Item 12.
\\n
Item 13.
\\n
\\n
down
\\n
\\n
\\n
\\n
\\n
Item 1.
\\n
Item 2.
\\n
Item 3.
\\n
Item 4.
\\n
Item 5.
\\n
Item 6.
\\n
Item 7.
\\n
Item 9.
\\n
Item 10.
\\n
Item 11.
\\n
Item 12.
\\n
Item 13.
\\n
\\n
\\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\t$templateCache.put(\"partials/partial-contribute.html\",\"
\\n
\\n
\\n \\n
\\n
\\n
\\n\");\n\t$templateCache.put(\"partials/partial-docs.html\",\"
\\n
\\n
\\n \\n
\\n \\n
\\n

\\n \\n

\\n \\n
\\n
\\n \\n
\\n \\n
\\n\");\n\t$templateCache.put(\"partials/partial-home.html\",\"
\\n
\\n \\n
\\n
\\n

DRAGULAR

\\n

Angular drag&drop based on dragula.

\\n

Live examples in docs

\\n
\\n
\\n
\\n

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

\\n

Inspiration

\\n

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

\\n

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

\\n

Differences of dragular (against dragula)

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

Todo

\\n
    \\n
  • improve docs
  • \\n
\\n

Features

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

For installation, usage and examples go to docs

\\n
\\n
\\n \\n
\\n \\n
\\n \\n
\\n\");\n\t$templateCache.put(\"partials/autogenerated/contribute.html\",\"

How to contribute

\\n

It'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.

\\n

Before contributing, please read the code of conduct.

\\n

Reporting issues

\\n

GitHub 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:

\\n

1. 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.

\\n

2. Not sure if it's a bug?. Then please ask via issues and tag it [question].

\\n

3. 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.

\\n

4. 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)

\\n

5. 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.

\\n

Dev vs. Master

\\n

The 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.

\\n

Making Changes

\\n

To take advantage of our npm build script and jshint config it will be easiest for you if you have node.js installed locally.

\\n

You can download node.js from nodejs.org.

\\n

After 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.

\\n

Developing

\\n

There are several gulp tasks that are used for generating different builds:

\\n
    \\n
  • gulp dev - Serves files with BrowserSync server, watches & automatically refreshes connected browsers on changes, generates non-minified but concatenated styles & scripts from the dragular source.
  • \\n
  • gulp dev:docs - Does exactly the same as gulp dev, except it works with the documentation source.
  • \\n
  • gulp build - Concatenates and minifies dragular source files.
  • \\n
  • gulp build:docs - Concatenates and minifies documentation source files.
  • \\n
\\n

Linting

\\n
    \\n
  • gulp lint & gulp lint:docs - Lint JavaScript files.
  • \\n
\\n

Making a pull request

\\n

Once that is ready, make your changes and submit a Pull Request:

\\n
    \\n
  • Send 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.

    \\n
  • \\n
  • Ensure changes are jshint validated. Our JSHint configuration file is provided in the repository and you should check against it before submitting.

    \\n
  • \\n
  • Only 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.

    \\n
  • \\n
\\n

Dependencies for building from source and running tests:

\\n

Coding style preferences are not contributions

\\n

If 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.

\\n

I don't really like git / node.js, but I can fix this bug

\\n

That 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","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","angular","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","len","getContainers","shLen","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","cloneNode","$emit","dragularcloned","containerIndex","indexOf","domIndexOf","dragulardrag","manualStart","rect","getBoundingClientRect","width","height","getRectWidth","getRectHeight","mirrorContainer","appendChild","body","unselectable","scrollContainer","drop","ungrab","moved","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","compileItemOnDrop","$applyAsync","content","dragulardrop","dropIndex","splice","dropElmModel","dontCopyModel","dragularremove","removeMirrorImage","dragularout","dragulardragend","destroy","removeContainers","all","changes","makeArray","index","before","scrollTop","deltaY","stopPropagation","depSanitize","getBool","dragularover","never","getEmptyObject","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","classList","contains","cartModel","removeItem","items","parentContainers","nestedContainers","push","addItem","$filter","filter1query","filter2query","filteredModel1","filteredModel2","getFilteredModel","filteredModel","filterQuery","$interval","bar","inc","speed","leftScrollContainer","rightScrollContainer","leftTopBar","leftBottomBar","rightTopBar","rightBottomBar","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,SAASP,EAAQD,EAASQ,GAG/B,YAIA,IAAIS,GAAWT,EAAoB,GAC/BU,EAAiBV,EAAoB,GACrCW,EAAYX,EAAoB,GAChCY,EAAiBZ,EAAoB,GACrCa,EAAkBb,EAAoB,GACtCc,EAAuBd,EAAoB,GAC3Ce,EAAuBf,EAAoB,GAC3CgB,EAAWhB,EAAoB,IAC/Bi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FD,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,kMACtDD,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\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\t__webpack_require__(30);\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', [dragular, 'templates', 'ui.router'])\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)\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('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\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.3 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\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: getEmptyObject, // 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\t\t\t\tif ( !_isArray( o.nameSpace ) ) {\n\t\t\t\t\to.nameSpace = [ o.nameSpace ];\n\t\t\t\t}\n\t\t\t\to.nameSpace.forEach( function eachNameSpace( nameSpace ) {\n\t\t\t\t\tif ( !shared.containers[ nameSpace ] ) {\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\t\t\t\t\tvar len = getContainers( o ).length,\n\t\t\t\t\t\tshLen = shared.containers[ nameSpace ].length;\n\t\t\t\t\tfor ( var i = 0; i < len; i++ ) {\n\t\t\t\t\t\tshared.containers[ nameSpace ][ i + shLen ] = getContainers( o )[ i ];\n\t\t\t\t\t\tshared.containersCtx[ nameSpace ][ i + shLen ] = {\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\tconsole.log( 'usecase?' );\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\tshared.item = context.item.cloneNode( true );\n\t\t\t\t\tshared.copy = true;\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\to.scope.$emit( o.eventNames[ 'dragular' + type ], shared.item, shared.lastDropTarget, shared.source, e );\n\t\t\t\t\t}\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}\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\tif ( 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.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\tconsole.log('release');\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\tif ( isInitialPlacement( target ) ) {\n\t\t\t\t\t\t\to.scope.$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\to.scope.$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\n\t\t\t\t\tif ( !o.compileItemOnDrop ) {\n\t\t\t\t\t\tcleanup();\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 getEmptyObject() {\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 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'));\n\t $scope.$on('dragulardrag', myFn('drag'));\n\t $scope.$on('dragularcancel', myFn('cancel'));\n\t $scope.$on('dragulardrop', myFn('drop'));\n\t $scope.$on('dragularremove', myFn('remove'));\n\t $scope.$on('dragulardragend', myFn('dragend'));\n\t $scope.$on('dragularshadow', myFn('shadow'));\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\n\tmodule.exports = EventsCtrl;\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'use strict'; module.exports = angular.module(\"templates\", []).run([\"$templateCache\", function($templateCache) {$templateCache.put(\"docsInstall/docsInstall.html\",\"

Install

\\n

download dragular.js and dragular.css from dist folder

\\n

OR clone git

\\n
\\ngit clone http://github.com/luckylooke/dragular.git\\n
\\n

OR use npm

\\n
\\n[sudo] npm install dragular\\n
\\n

OR use bower

\\n
\\nbower install dragular\\n
\\n

AND 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
\\n

AND put dragularModule into dependency array

\\n
\\nvar app = angular.module(\\'myApp\\', [\\'dragularModule\\', \\'otherDependencies\\']);\\n
\\n

DONE :)

\\n\");\n\t$templateCache.put(\"exampleBasic/exampleBasic.html\",\"
\\n

Basic

\\n \\n
\\n
\\n
Move me, but you can only drop me in one of these containers.
\\n
If you try to drop me somewhere other than these containers, I\\'ll just come back.
\\n
Item 3.
\\n
Item 6.
\\n
\\n
\\n
You can drop me in the left container, otherwise I\\'ll stay here.
\\n
Try to click me, dragular distinguish drag from click
\\n
Item 5.
\\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      
\\n
\\n\");\n\t$templateCache.put(\"exampleBasicWithModel/exampleBasicWithModel.html\",\"
\\n

Basic - with model

\\n \\n
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
\\n
\\n
Items1:\\n          
{{items1 | json}}
\\n
\\n
\\n
Items2:\\n          
{{items2 | json}}
\\n
\\n
\\n
\\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\");\n\t$templateCache.put(\"exampleBoundingBox/exampleBoundingBox.html\",\"
\\n

BoundingBox

\\n \\n
\\n
\\n
This items cannot cross its example element, just try it your selves.
\\n
Item 2.
\\n
Item 3.
\\n
Item 6.
\\n
\\n
\\n
This items cannot cross its example element, just try it your selves.
\\n
Item 4.
\\n
Item 5.
\\n
\\n
\\n
\\n        \\n  dragularService([$element.children(), {\\n    boundingBox: $element\\n  });\\n        \\n      
\\n
\");\n\t$templateCache.put(\"exampleBoundingBoxLockX/exampleBoundingBoxLockX.html\",\"
\\n

BoundingBox and lockX

\\n \\n
\\n
\\n
\\n
Items are locked in X axis movement and cannot cross its closest parent div.boundingBox, just try it your selves.
\\n
item 2
\\n
item 3
\\n
item 4
\\n
\\n
\\n
\\n
\\n        \\n  dragularService([$element.children()[0].children(), {\\n    boundingBox: $element.children()[0],\\n    lockX: true\\n  });\\n        \\n      
\\n
\");\n\t$templateCache.put(\"exampleBoundingBoxLockY/exampleBoundingBoxLockY.html\",\"
\\n

BoundingBox and LockY

\\n \\n
\\n
\\n
\\n
Items are locked in Y axis movement and cannot cross its closest parent div.boundingBox, just try it your selves.
\\n
item 2
\\n
item 3
\\n
item 4
\\n
item 5
\\n
item 6
\\n
\\n
\\n
\\n
\\n        \\n  dragularService([$element.children()[0].children(), {\\n    boundingBox: $element.children()[0],\\n    lockY: true\\n  });\\n        \\n      
\\n
\");\n\t$templateCache.put(\"exampleCopy/exampleCopy.html\",\"
\\n

Copy

\\n \\n
\\n
\\n
Move me, and make copy on drop.
\\n
If you try to drop me somewhere other than these containers, I\\'ll just come back.
\\n
\\n
\\n
You can drop me in the left container, otherwise I\\'ll stay here.
\\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\t$templateCache.put(\"exampleCopyWithModel/exampleCopyWithModel.html\",\"
\\n

Copy - with model

\\n \\n
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
\\n
\\n
Items1:\\n
\\n            {{ items1 | json }}\\n          
\\n
\\n
\\n
\\n
Items2:\\n
\\n            {{ items2 | json }}\\n          
\\n
\\n
\\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\");\n\t$templateCache.put(\"exampleCustomClasses/exampleCustomClasses.html\",\"
\\n

Custom classes

\\n \\n
\\n
\\n
Move me, but you can only drop me in one of these containers.
\\n
If you try to drop me somewhere other than these containers, I\\'ll just come back.
\\n
Item 3.
\\n
Item 6.
\\n
\\n
\\n
You can drop me in the left container, otherwise I\\'ll stay here.
\\n
Item 4.
\\n
Item 5.
\\n
\\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      
\\n
\\n\");\n\t$templateCache.put(\"exampleDifferentOptionsWithModel/exampleDifferentOptionsWithModel.html\",\"
\\n

Different options - with model

\\n \\n
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
\\n
\\n
Items1:\\n          
{{items1 | json}}
\\n
\\n
\\n
Items2:\\n          
{{items2 | json}}
\\n
\\n
\\n
\\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\t$templateCache.put(\"exampleDirective/exampleDirective.html\",\"
\\n

Directive

\\n \\n
\\n
\\n
Move me, but you can only drop me in one of these containers.
\\n
If you try to drop me somewhere other than these containers, I\\'ll just come back.
\\n
Item 3.
\\n
Item 6.
\\n
\\n
\\n
You can drop me in the left container, otherwise I\\'ll stay here.
\\n
Item 4.
\\n
Item 5.
\\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\t$templateCache.put(\"exampleDirectiveWithModel/exampleDirectiveWithModel.html\",\"
\\n

Directive - with model

\\n \\n
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
\\n
\\n
Items1:\\n
{{items1 | json}}
\\n
\\n
\\n
Items2:\\n
{{items2 | json}}
\\n
\\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      
\\n
\\n\");\n\t$templateCache.put(\"exampleDragOverEvents/exampleDragOverEvents.html\",\"
\\n

Drag-over events

\\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\\n
\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
dragularService.shared.itemitem beeing dragged (it is copy of item if copy is enabled via options)
dragularService.shared.sourcesource container item is dragged from
dragularService.shared.sourceModelsource container model representation if model was porvided
dragularService.shared.initialIndexoriginal index of item, can be used to get item model from sourceModel
dragularService.shared.extracontains accepting information (boolean) on dragenter, element drag is leaving to on dragleave and element behind the cursor on dragrelease
\\n
\\n\\n

Try to drag over the not-container too.

\\n
\\n
\\n
apples and oranges cannot be mixed
\\n
apple 2
\\n
apple 3
\\n
apple 4
\\n
\\n
\\n
orange 1
\\n
orange 2
\\n
orange 3
\\n
orange 4
\\n
\\n
\\n
apple 5
\\n
apple 6
\\n
apple 7
\\n
apple 8
\\n
\\n
\\n
orange 5
\\n
orange 6
\\n
orange 7
\\n
orange 8
\\n
\\n
\\n
Test active class on NOT container.
\\n\\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  
\\n
\\n\");\n\t$templateCache.put(\"exampleEvents/exampleEvents.html\",\"
\\n

Events

\\n \\n
\\n
\\n
Move me, but you can only drop me in one of these containers.
\\n
If you try to drop me somewhere other than these containers, I\\'ll just come back.
\\n
Item 3.
\\n
Item 6.
\\n
\\n
\\n
You can drop me in the left container, otherwise I\\'ll stay here.
\\n
Item 4.
\\n
Item 5.
\\n
\\n
\\n
\\n        \\n.controller(\\'Events\\', [\\'$scope\\', \\'$element\\', \\'dragularService\\', \\'$timeout\\', function TodoCtrl($scope, $element, dragularService, $timeout) {\\n    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\\'));\\n    $scope.$on(\\'dragulardrag\\', myFn(\\'drag\\'));\\n    $scope.$on(\\'dragularcancel\\', myFn(\\'cancel\\'));\\n    $scope.$on(\\'dragulardrop\\', myFn(\\'drop\\'));\\n    $scope.$on(\\'dragularremove\\', myFn(\\'remove\\'));\\n    $scope.$on(\\'dragulardragend\\', myFn(\\'dragend\\'));\\n    $scope.$on(\\'dragularshadow\\', myFn(\\'shadow\\'));\\n\\n    function myFn(eventName) {\\n      return function() {\\n        console.log(eventName, arguments);\\n      };\\n    }\\n\\n  }]);\\n        \\n      
\\n
\\n\");\n\t$templateCache.put(\"exampleHandle/exampleHandle.html\",\"
\\n

Handle

\\n \\n
\\n
\\n
+Move me, but you can use the plus sign to drag me around.
\\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      
\\n
\\n\");\n\t$templateCache.put(\"exampleIsContainerWithModel/exampleIsContainerWithModel.html\",\"
\\n

isContainer - with model

\\n \\n
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
{{item.content}}\\n
\\n
\\n
\\n
\\n
\\n
Items1:\\n          
{{items1 | json}}
\\n
\\n
\\n
Cart:\\n          
{{cartModel | json}}
\\n
\\n
\\n
\\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
\\n\");\n\t$templateCache.put(\"exampleNameSpaces/exampleNameSpaces.html\",\"
\\n

NameSpaces

\\n \\n
\\n
\\n
try to mix oranges and apples
\\n
apple 2
\\n
apple 3
\\n
apple 4
\\n
\\n
\\n
orange 1
\\n
orange 2
\\n
orange 3
\\n
orange 4
\\n
\\n
\\n
apple 5
\\n
apple 6
\\n
apple 7
\\n
apple 8
\\n
\\n
\\n
mixed 1
\\n
mixed 2
\\n
mixed 3
\\n
mixed 4
\\n
\\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\t$templateCache.put(\"exampleNestedNgRepeat/exampleNestedNgRepeat.html\",\"
\\n

Nested ngRepeat

\\n \\n
\\n
\\n
Row {{$index}}
\\n
{{item.content}}
\\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\");\n\t$templateCache.put(\"exampleNestedNgRepeatWithModel/exampleNestedNgRepeatWithModel.html\",\"
\\n

Nested ngRepeat - with model

\\n \\n
\\n
\\n
\\n
\\n
Row {{::$index}}
\\n
\\n
{{item.content}}
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n            
Items:\\n
{{items | json}}
\\n
\\n
\\n
\\n
\\n
\\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\t$templateCache.put(\"exampleNgRepeat/exampleNgRepeat.html\",\"
\\n

ngRepeat

\\n \\n
\\n
\\n
\\n {{item.content}}\\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
\\n\");\n\t$templateCache.put(\"exampleNgRepeatFilteredWithModel/exampleNgRepeatFilteredWithModel.html\",\"
\\n

Filtered ngRepeat - with model

\\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!

\\n
\\n
\\n
\\n \\n
\\n
\\n \\n
\\n
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
\\n
\\n
Items1:\\n          
{{items1 | json}}
\\n
\\n
\\n
Items2:\\n          
{{items2 | json}}
\\n
\\n
\\n
\\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\");\n\t$templateCache.put(\"exampleNgRepeatWithModel/exampleNgRepeatWithModel.html\",\"
\\n

ngRepeat - with model

\\n \\n
\\n
\\n
\\n
\\n {{item.content}}\\n \\n \\n
\\n
\\n
\\n
\\n
\\n
Items:\\n
{{items | json}}
\\n
\\n
\\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\t$templateCache.put(\"exampleRemoveOnSpill/exampleRemoveOnSpill.html\",\"
\\n

Remove on spill

\\n \\n
\\n
\\n
Move me, but you can only drop me in containers.
\\n
If you try to drop me somewhere other than containers, I\\'ll die a fiery death.
\\n
Item 3.
\\n
Item 6.
\\n
Item 4.
\\n
Item 5.
\\n
\\n
\\n
You can drop me in the left container.
\\n
Item 4.
\\n
Item 5.
\\n
\\n
\\n
\\n        \\n  dragularService([document.getElementById(single)], { removeOnSpill: true });\\n        \\n      
\\n
\");\n\t$templateCache.put(\"exampleRemoveOnSpillWithModel/exampleRemoveOnSpillWithModel.html\",\"
\\n

Remove on spill - with model

\\n \\n
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
{{item.content}}
\\n
\\n
\\n
\\n
\\n
Items1:\\n          
{{items1 | json}}
\\n
\\n
\\n
Items2:\\n          
{{items2 | json}}
\\n
\\n
\\n
\\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\");\n\t$templateCache.put(\"exampleRevertOnSpill/exampleRevertOnSpill.html\",\"
\\n

Revert on spill

\\n \\n
\\n
\\n
Move me, but you can only drop me in one of these containers.
\\n
If you try to drop me somewhere other than these containers, I\\'ll just come back.
\\n
Item 3.
\\n
Item 6.
\\n
\\n
\\n
You can drop me in the left container, otherwise I\\'ll stay here.
\\n
Item 4.
\\n
Item 5.
\\n
\\n
\\n
\\n        \\n  dragularService([document.getElementById(left), document.getElementById(right)], { revertOnSpill: true });\\n        \\n      
\\n
\");\n\t$templateCache.put(\"exampleScrollingDrag/exampleScrollingDrag.html\",\"
\\n

Scrolling drag

\\n \\n
\\n
\\n
up
\\n
\\n
Item 1.
\\n
Item 2.
\\n
Item 3.
\\n
Item 4.
\\n
Item 5.
\\n
Item 6.
\\n
Item 7.
\\n
Item 9.
\\n
Item 10.
\\n
Item 11.
\\n
Item 12.
\\n
Item 13.
\\n
\\n
down
\\n
\\n
\\n
\\n
\\n
Item 1.
\\n
Item 2.
\\n
Item 3.
\\n
Item 4.
\\n
Item 5.
\\n
Item 6.
\\n
Item 7.
\\n
Item 9.
\\n
Item 10.
\\n
Item 11.
\\n
Item 12.
\\n
Item 13.
\\n
\\n
\\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\t$templateCache.put(\"partials/partial-contribute.html\",\"
\\n
\\n
\\n \\n
\\n
\\n
\\n\");\n\t$templateCache.put(\"partials/partial-docs.html\",\"
\\n
\\n
\\n \\n
\\n \\n
\\n

\\n \\n

\\n \\n
\\n
\\n \\n
\\n \\n
\\n\");\n\t$templateCache.put(\"partials/partial-home.html\",\"
\\n
\\n \\n
\\n
\\n

DRAGULAR

\\n

Angular drag&drop based on dragula.

\\n

Live examples in docs

\\n
\\n
\\n
\\n

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

\\n

Inspiration

\\n

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

\\n

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

\\n

Differences of dragular (against dragula)

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

Todo

\\n
    \\n
  • improve docs
  • \\n
\\n

Features

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

For installation, usage and examples go to docs

\\n
\\n
\\n \\n
\\n \\n
\\n \\n
\\n\");\n\t$templateCache.put(\"partials/autogenerated/contribute.html\",\"

How to contribute

\\n

It'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.

\\n

Before contributing, please read the code of conduct.

\\n

Reporting issues

\\n

GitHub 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:

\\n

1. 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.

\\n

2. Not sure if it's a bug?. Then please ask via issues and tag it [question].

\\n

3. 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.

\\n

4. 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)

\\n

5. 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.

\\n

Dev vs. Master

\\n

The 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.

\\n

Making Changes

\\n

To take advantage of our npm build script and jshint config it will be easiest for you if you have node.js installed locally.

\\n

You can download node.js from nodejs.org.

\\n

After 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.

\\n

Developing

\\n

There are several gulp tasks that are used for generating different builds:

\\n
    \\n
  • gulp dev - Serves files with BrowserSync server, watches & automatically refreshes connected browsers on changes, generates non-minified but concatenated styles & scripts from the dragular source.
  • \\n
  • gulp dev:docs - Does exactly the same as gulp dev, except it works with the documentation source.
  • \\n
  • gulp build - Concatenates and minifies dragular source files.
  • \\n
  • gulp build:docs - Concatenates and minifies documentation source files.
  • \\n
\\n

Linting

\\n
    \\n
  • gulp lint & gulp lint:docs - Lint JavaScript files.
  • \\n
\\n

Making a pull request

\\n

Once that is ready, make your changes and submit a Pull Request:

\\n
    \\n
  • Send 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.

    \\n
  • \\n
  • Ensure changes are jshint validated. Our JSHint configuration file is provided in the repository and you should check against it before submitting.

    \\n
  • \\n
  • Only 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.

    \\n
  • \\n
\\n

Dependencies for building from source and running tests:

\\n

Coding style preferences are not contributions

\\n

If 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.

\\n

I don't really like git / node.js, but I can fix this bug

\\n

That 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/partials/partial-home.html b/docs/src/examples/partials/partial-home.html index 16a06633..a03802c8 100644 --- a/docs/src/examples/partials/partial-home.html +++ b/docs/src/examples/partials/partial-home.html @@ -12,7 +12,7 @@

DRAGULAR

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

Inspiration

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

-

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

+

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

Differences of dragular (against dragula)

  • replaced dragula crossvent with angulars event binding
  • diff --git a/docs/src/examples/templates.js b/docs/src/examples/templates.js index 2ee2cfc0..57bfe04b 100644 --- a/docs/src/examples/templates.js +++ b/docs/src/examples/templates.js @@ -1,6 +1,6 @@ 'use strict'; module.exports = angular.module("templates", []).run(["$templateCache", function($templateCache) {$templateCache.put("docsInstall/docsInstall.html","

    Install

    \n

    download dragular.js and dragular.css from dist folder

    \n

    OR clone git

    \n
    \ngit clone http://github.com/luckylooke/dragular.git\n
    \n

    OR use npm

    \n
    \n[sudo] npm install dragular\n
    \n

    OR use bower

    \n
    \nbower install dragular\n
    \n

    AND 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
    \n

    AND put dragularModule into dependency array

    \n
    \nvar app = angular.module(\'myApp\', [\'dragularModule\', \'otherDependencies\']);\n
    \n

    DONE :)

    \n"); -$templateCache.put("exampleBasicWithModel/exampleBasicWithModel.html","
    \n

    Basic - with model

    \n \n
    \n
    \n
    \n
    {{item.content}}
    \n
    \n
    \n
    {{item.content}}
    \n
    \n
    \n
    \n
    \n
    Items1:\n          
    {{items1 | json}}
    \n
    \n
    \n
    Items2:\n          
    {{items2 | json}}
    \n
    \n
    \n
    \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"); $templateCache.put("exampleBasic/exampleBasic.html","
    \n

    Basic

    \n \n
    \n
    \n
    Move me, but you can only drop me in one of these containers.
    \n
    If you try to drop me somewhere other than these containers, I\'ll just come back.
    \n
    Item 3.
    \n
    Item 6.
    \n
    \n
    \n
    You can drop me in the left container, otherwise I\'ll stay here.
    \n
    Try to click me, dragular distinguish drag from click
    \n
    Item 5.
    \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      
    \n
    \n"); +$templateCache.put("exampleBasicWithModel/exampleBasicWithModel.html","
    \n

    Basic - with model

    \n \n
    \n
    \n
    \n
    {{item.content}}
    \n
    \n
    \n
    {{item.content}}
    \n
    \n
    \n
    \n
    \n
    Items1:\n          
    {{items1 | json}}
    \n
    \n
    \n
    Items2:\n          
    {{items2 | json}}
    \n
    \n
    \n
    \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"); $templateCache.put("exampleBoundingBox/exampleBoundingBox.html","
    \n

    BoundingBox

    \n \n
    \n
    \n
    This items cannot cross its example element, just try it your selves.
    \n
    Item 2.
    \n
    Item 3.
    \n
    Item 6.
    \n
    \n
    \n
    This items cannot cross its example element, just try it your selves.
    \n
    Item 4.
    \n
    Item 5.
    \n
    \n
    \n
    \n        \n  dragularService([$element.children(), {\n    boundingBox: $element\n  });\n        \n      
    \n
    "); $templateCache.put("exampleBoundingBoxLockX/exampleBoundingBoxLockX.html","
    \n

    BoundingBox and lockX

    \n \n
    \n
    \n
    \n
    Items are locked in X axis movement and cannot cross its closest parent div.boundingBox, just try it your selves.
    \n
    item 2
    \n
    item 3
    \n
    item 4
    \n
    \n
    \n
    \n
    \n        \n  dragularService([$element.children()[0].children(), {\n    boundingBox: $element.children()[0],\n    lockX: true\n  });\n        \n      
    \n
    "); $templateCache.put("exampleBoundingBoxLockY/exampleBoundingBoxLockY.html","
    \n

    BoundingBox and LockY

    \n \n
    \n
    \n
    \n
    Items are locked in Y axis movement and cannot cross its closest parent div.boundingBox, just try it your selves.
    \n
    item 2
    \n
    item 3
    \n
    item 4
    \n
    item 5
    \n
    item 6
    \n
    \n
    \n
    \n
    \n        \n  dragularService([$element.children()[0].children(), {\n    boundingBox: $element.children()[0],\n    lockY: true\n  });\n        \n      
    \n
    "); @@ -26,5 +26,5 @@ $templateCache.put("exampleRevertOnSpill/exampleRevertOnSpill.html"," \n

    Scrolling drag

    \n \n
    \n
    \n
    up
    \n
    \n
    Item 1.
    \n
    Item 2.
    \n
    Item 3.
    \n
    Item 4.
    \n
    Item 5.
    \n
    Item 6.
    \n
    Item 7.
    \n
    Item 9.
    \n
    Item 10.
    \n
    Item 11.
    \n
    Item 12.
    \n
    Item 13.
    \n
    \n
    down
    \n
    \n
    \n
    \n
    \n
    Item 1.
    \n
    Item 2.
    \n
    Item 3.
    \n
    Item 4.
    \n
    Item 5.
    \n
    Item 6.
    \n
    Item 7.
    \n
    Item 9.
    \n
    Item 10.
    \n
    Item 11.
    \n
    Item 12.
    \n
    Item 13.
    \n
    \n
    \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"); $templateCache.put("partials/partial-contribute.html","
    \n
    \n
    \n \n
    \n
    \n
    \n"); $templateCache.put("partials/partial-docs.html","
    \n
    \n
    \n \n
    \n \n
    \n

    \n \n

    \n \n
    \n
    \n \n
    \n \n
    \n"); -$templateCache.put("partials/partial-home.html","
    \n
    \n \n
    \n
    \n

    DRAGULAR

    \n

    Angular drag&drop based on dragula.

    \n

    Live examples in docs

    \n
    \n
    \n
    \n

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

    \n

    Inspiration

    \n

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

    \n

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

    \n

    Differences of dragular (against dragula)

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

    Todo

    \n
      \n
    • improve docs
    • \n
    \n

    Features

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

    For installation, usage and examples go to docs

    \n
    \n
    \n \n
    \n \n
    \n \n
    \n"); +$templateCache.put("partials/partial-home.html","
    \n
    \n \n
    \n
    \n

    DRAGULAR

    \n

    Angular drag&drop based on dragula.

    \n

    Live examples in docs

    \n
    \n
    \n
    \n

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

    \n

    Inspiration

    \n

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

    \n

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

    \n

    Differences of dragular (against dragula)

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

    Todo

    \n
      \n
    • improve docs
    • \n
    \n

    Features

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

    For installation, usage and examples go to docs

    \n
    \n
    \n \n
    \n \n
    \n \n
    \n"); $templateCache.put("partials/autogenerated/contribute.html","

    How to contribute

    \n

    It'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.

    \n

    Before contributing, please read the code of conduct.

    \n

    Reporting issues

    \n

    GitHub 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:

    \n

    1. 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.

    \n

    2. Not sure if it's a bug?. Then please ask via issues and tag it [question].

    \n

    3. 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.

    \n

    4. 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)

    \n

    5. 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.

    \n

    Dev vs. Master

    \n

    The 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.

    \n

    Making Changes

    \n

    To take advantage of our npm build script and jshint config it will be easiest for you if you have node.js installed locally.

    \n

    You can download node.js from nodejs.org.

    \n

    After 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.

    \n

    Developing

    \n

    There are several gulp tasks that are used for generating different builds:

    \n
      \n
    • gulp dev - Serves files with BrowserSync server, watches & automatically refreshes connected browsers on changes, generates non-minified but concatenated styles & scripts from the dragular source.
    • \n
    • gulp dev:docs - Does exactly the same as gulp dev, except it works with the documentation source.
    • \n
    • gulp build - Concatenates and minifies dragular source files.
    • \n
    • gulp build:docs - Concatenates and minifies documentation source files.
    • \n
    \n

    Linting

    \n
      \n
    • gulp lint & gulp lint:docs - Lint JavaScript files.
    • \n
    \n

    Making a pull request

    \n

    Once that is ready, make your changes and submit a Pull Request:

    \n
      \n
    • Send 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.

      \n
    • \n
    • Ensure changes are jshint validated. Our JSHint configuration file is provided in the repository and you should check against it before submitting.

      \n
    • \n
    • Only 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.

      \n
    • \n
    \n

    Dependencies for building from source and running tests:

    \n

    Coding style preferences are not contributions

    \n

    If 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.

    \n

    I don't really like git / node.js, but I can fix this bug

    \n

    That 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");}]); \ No newline at end of file diff --git a/readme.md b/readme.md index 17e24b07..f41c3e8f 100644 --- a/readme.md +++ b/readme.md @@ -13,7 +13,7 @@ Browser support includes every sane browser and **IE7+**. _(Granted you pol I was working on huge angular project and I was using several drag&drop libraries in it, one for UI, one for lists, etc.. I wanted 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](http://github.com/bevacqua/dragula) by [Nicolas Bevacqua](http://github.com/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](http://github.com/bevacqua/angular-dragula). -Actual version 4.4.2 is based on dragula 3.6.3 and tested with angular 1.5.5. +Actual version 4.4.3 is based on dragula 3.6.3 and tested with angular 1.5.5. # Differences of dragular (against dragula) diff --git a/src/dragularModule.js b/src/dragularModule.js index 56cb1df2..3c326c61 100644 --- a/src/dragularModule.js +++ b/src/dragularModule.js @@ -4,7 +4,7 @@ var dragularDirective = require( './dragularDirective' ); var dragularService = require( './dragularService' ); /** - * Dragular 4.4.2 by Luckylooke https://github.com/luckylooke/dragular + * Dragular 4.4.3 by Luckylooke https://github.com/luckylooke/dragular * Angular version of dragula https://github.com/bevacqua/dragula */ module.exports = 'dragularModule';