angular-draganddrop
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -1,2 +0,2 @@ | ||
/*! Angular draganddrop v0.1.4 | (c) 2013 Greg Bergé | License MIT */ | ||
/*! Angular draganddrop v0.2.1 | (c) 2013 Greg Bergé | License MIT */ | ||
@@ -49,3 +49,3 @@ angular | ||
e.dataTransfer.setData('json/' + draggableType, jsonData); | ||
e.stopPropagation(); | ||
@@ -52,0 +52,0 @@ }); |
@@ -1,3 +0,3 @@ | ||
/*! Angular draganddrop v0.1.4 | (c) 2013 Greg Bergé | License MIT */ | ||
function draggableDirective(){return{restrict:"A",link:function(a,b,c){var d=b[0],e=c.effectAllowed,f=c.draggableData,g=c.draggableType,h="false"===c.draggable?!1:!0;d.draggable=h,h&&d.addEventListener("dragstart",function(b){b.dataTransfer.effectAllowed=e||b.dataTransfer.effectAllowed;var c=a.$eval(f),d=angular.toJson(c);b.dataTransfer.setData("json/"+g,d)})}}}function dropDirective(a){return{restrict:"A",link:function(b,c,d){function e(a){return h(b.$eval(m),a)?(n&&c.addClass(n),a.dataTransfer.dropEffect=l||a.dataTransfer.dropEffect,b.$apply(function(){o(b,{$event:a})}),void a.preventDefault()):!0}function f(a){var c=i(a);g(),b.$apply(function(){p(b,{$data:c,$event:a})}),a.preventDefault()}function g(){c.removeClass(n)}function h(a,b){return"boolean"==typeof a?a:"string"==typeof a?h([a],b):Array.isArray(a)?h(function(b){return b.some(function(b){return-1!==a.indexOf(b)})},b):"function"==typeof a?a(j(b.dataTransfer.types)):!1}function i(a){var b=j(a.dataTransfer.types);return b.reduce(function(b,c){var d=a.dataTransfer.getData(c),e=/(.*)\//.exec(c);return e=e?e[1]:null,"json"===e&&(d=JSON.parse(d)),b[c]=d,b},{})}function j(a){return Array.prototype.slice.call(a)}var k=c[0],l=d.dropEffect,m=d.dropAccept,n=d.dragOverClass,o=a(d.dragOver),p=a(d.drop);k.addEventListener("dragover",e),k.addEventListener("drop",f),k.addEventListener("dragleave",g),b.$on("$destroy",function(){k.removeEventListener("dragover",e),k.removeEventListener("drop",f),k.removeEventListener("dragleave",g)})}}}angular.module("draganddrop",[]).directive("draggable",draggableDirective).directive("drop",["$parse",dropDirective]); | ||
/*! Angular draganddrop v0.2.1 | (c) 2013 Greg Bergé | License MIT */ | ||
function draggableDirective(){return{restrict:"A",link:function(a,b,c){var d=b[0],e=c.effectAllowed,f=c.draggableData,g=c.draggableType,h="false"===c.draggable?!1:!0;d.draggable=h,h&&d.addEventListener("dragstart",function(b){b.dataTransfer.effectAllowed=e||b.dataTransfer.effectAllowed;var c=a.$eval(f),d=angular.toJson(c);b.dataTransfer.setData("json/"+g,d),b.stopPropagation()})}}}function dropDirective(a){return{restrict:"A",link:function(b,c,d){function e(a){return h(b.$eval(m),a)?(n&&c.addClass(n),a.dataTransfer.dropEffect=l||a.dataTransfer.dropEffect,b.$apply(function(){o(b,{$event:a})}),void a.preventDefault()):!0}function f(a){var c=i(a);g(),b.$apply(function(){p(b,{$data:c,$event:a})}),a.preventDefault()}function g(){c.removeClass(n)}function h(a,b){return"boolean"==typeof a?a:"string"==typeof a?h([a],b):Array.isArray(a)?h(function(b){return b.some(function(b){return-1!==a.indexOf(b)})},b):"function"==typeof a?a(j(b.dataTransfer.types)):!1}function i(a){var b=j(a.dataTransfer.types);return b.reduce(function(b,c){var d=a.dataTransfer.getData(c),e=/(.*)\//.exec(c);return e=e?e[1]:null,"json"===e&&(d=JSON.parse(d)),b[c]=d,b},{})}function j(a){return Array.prototype.slice.call(a)}var k=c[0],l=d.dropEffect,m=d.dropAccept,n=d.dragOverClass,o=a(d.dragOver),p=a(d.drop);k.addEventListener("dragover",e),k.addEventListener("drop",f),k.addEventListener("dragleave",g),b.$on("$destroy",function(){k.removeEventListener("dragover",e),k.removeEventListener("drop",f),k.removeEventListener("dragleave",g)})}}}angular.module("draganddrop",[]).directive("draggable",draggableDirective).directive("drop",["$parse",dropDirective]); | ||
//# sourceMappingURL=angular-draganddrop.min.map |
{ | ||
"name": "angular-draganddrop", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"homepage": "https://github.com/neoziro/angular-draganddrop", | ||
@@ -5,0 +5,0 @@ "authors": [ |
{ | ||
"name": "angular-draganddrop", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "Drag and drop directives for Angular using native HTML5 API.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26349