angularjs-drag-and-drop
Advanced tools
Comparing version 0.0.1 to 0.0.2
16
index.js
@@ -39,3 +39,2 @@ /** | ||
return { | ||
// priority: 1001, | ||
restrict: 'A', | ||
@@ -54,6 +53,6 @@ scope: { | ||
if (e.preventDefault) { | ||
e.preventDefault(); // Necessary. Allows us to drop. | ||
e.preventDefault(); | ||
} | ||
e.dataTransfer.dropEffect = 'move'; // See the section on the DataTransfer object. | ||
e.dataTransfer.dropEffect = 'move'; | ||
return false; | ||
@@ -67,3 +66,3 @@ }); | ||
el.bind("dragleave", function (e) { | ||
angular.element(this).removeClass('draganddrop-over'); // this / e.target is previous target element. | ||
angular.element(this).removeClass('draganddrop-over'); | ||
}); | ||
@@ -73,9 +72,14 @@ | ||
if (e.preventDefault) { | ||
e.preventDefault(); // Necessary. Allows us to drop. | ||
e.preventDefault(); | ||
} | ||
if (e.stopPropagation) { | ||
e.stopPropagation(); // Necessary. Allows us to drop. | ||
e.stopPropagation(); | ||
} | ||
if (!e.dataTransfer.getData("object")) { | ||
console.warn("Grag data not exists. Drop event canceled"); | ||
return false; | ||
} | ||
var data = JSON.parse(e.dataTransfer.getData("object")); | ||
@@ -82,0 +86,0 @@ |
{ | ||
"name": "angularjs-drag-and-drop", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Native Drag&Drop for angularjs", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
83
3425