Comparing version 2.8.0 to 2.9.0
@@ -1,1 +0,1 @@ | ||
!function(n){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.DragDrop=n()}}(function(){return function n(e,r,t){function o(a,f){if(!r[a]){if(!e[a]){var u="function"==typeof require&&require;if(!f&&u)return u(a,!0);if(i)return i(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var s=r[a]={exports:{}};e[a][0].call(s.exports,function(n){var r=e[a][1][n];return o(r?r:n)},s,s.exports,n,e,r,t)}return r[a].exports}for(var i="function"==typeof require&&require,a=0;a<t.length;a++)o(t[a]);return o}({1:[function(n,e,r){function t(){s=!1,f.length?c=f.concat(c):l=-1,c.length&&o()}function o(){if(!s){var n=setTimeout(t);s=!0;for(var e=c.length;e;){for(f=c,c=[];++l<e;)f&&f[l].run();l=-1,e=c.length}f=null,s=!1,clearTimeout(n)}}function i(n,e){this.fun=n,this.array=e}function a(){}var f,u=e.exports={},c=[],s=!1,l=-1;u.nextTick=function(n){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];c.push(new i(n,e)),1!==c.length||s||setTimeout(o,0)},i.prototype.run=function(){this.fun.apply(null,this.array)},u.title="browser",u.browser=!0,u.env={},u.argv=[],u.version="",u.versions={},u.on=a,u.addListener=a,u.once=a,u.off=a,u.removeListener=a,u.removeAllListeners=a,u.emit=a,u.binding=function(n){throw new Error("process.binding is not supported")},u.cwd=function(){return"/"},u.chdir=function(n){throw new Error("process.chdir is not supported")},u.umask=function(){return 0}},{}],2:[function(n,e,r){e.exports=function(n,e){function r(n,t){return n.reduce(function(n,o){return Array.isArray(o)&&e>t?n.concat(r(o,t+1)):n.concat(o)},[])}return e="number"==typeof e?e:1/0,e?r(n,1):Array.isArray(n)?n.map(function(n){return n}):n}},{}],3:[function(n,e,r){(function(n){e.exports=function(e,r){function t(e){function t(){r&&r(e,i),r=null}u?n.nextTick(t):t()}function o(n,e,r){i[n]=r,(0===--a||e)&&t(e)}var i,a,f,u=!0;Array.isArray(e)?(i=[],a=e.length):(f=Object.keys(e),i={},a=f.length),a?f?f.forEach(function(n){e[n](o.bind(void 0,n))}):e.forEach(function(n,e){n(o.bind(void 0,e))}):t(null),u=!1}}).call(this,n("_process"))},{_process:1}],"/":[function(n,e,r){function t(n,e){"string"==typeof n&&(n=window.document.querySelector(n)),"function"==typeof e&&(e={onDrop:e});var r=i(n,e.onDragOver),t=a(n,e.onDragLeave),u=f(n,e.onDrop,e.onDragLeave);return n.addEventListener("dragenter",o,!1),n.addEventListener("dragover",r,!1),n.addEventListener("dragleave",t,!1),n.addEventListener("drop",u,!1),function(){n instanceof window.Element&&n.classList.remove("drag"),n.removeEventListener("dragenter",o,!1),n.removeEventListener("dragover",r,!1),n.removeEventListener("dragleave",t,!1),n.removeEventListener("drop",u,!1)}}function o(n){return n.stopPropagation(),n.preventDefault(),!1}function i(n,e){return function(r){return r.stopPropagation(),r.preventDefault(),n instanceof window.Element&&n.classList.add("drag"),r.dataTransfer.dropEffect="copy",e&&e(r),!1}}function a(n,e){return function(r){if(r.target!==n){for(var t=r.target;t!==n;)t=t.parentNode;if(!t)return}return r.stopPropagation(),r.preventDefault(),e&&e(r),n instanceof window.Element&&n.classList.remove("drag"),!1}}function f(n,e,r){return function(t){t.stopPropagation(),t.preventDefault(),r&&r(t),n instanceof window.Element&&n.classList.remove("drag");var o={x:t.clientX,y:t.clientY};if(t.dataTransfer.items){var i=c(t.dataTransfer.items).filter(function(n){return"file"===n.kind});if(0===i.length)return;l(i.map(function(n){return function(e){u(n.webkitGetAsEntry(),e)}}),function(n,r){if(n)throw n;e(s(r),o)})}else{var a=c(t.dataTransfer.files);if(0===a.length)return;a.forEach(function(n){n.fullPath="/"+n.name}),e(a,o)}return!1}}function u(n,e){function r(){i.readEntries(function(n){n.length>0?(o=o.concat(c(n)),r()):t()})}function t(){l(o.map(function(n){return function(e){u(n,e)}}),e)}var o=[];if(n.isFile)n.file(function(r){r.fullPath=n.fullPath,e(null,r)},function(n){e(n)});else if(n.isDirectory){var i=n.createReader();r()}}function c(n){return Array.prototype.slice.call(n||[],0)}e.exports=t;var s=n("flatten"),l=n("run-parallel")},{flatten:2,"run-parallel":3}]},{},[])("/")}); | ||
!function(n){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.DragDrop=n()}}(function(){return function n(e,t,r){function o(u,a){if(!t[u]){if(!e[u]){var f="function"==typeof require&&require;if(!a&&f)return f(u,!0);if(i)return i(u,!0);var c=new Error("Cannot find module '"+u+"'");throw c.code="MODULE_NOT_FOUND",c}var s=t[u]={exports:{}};e[u][0].call(s.exports,function(n){var t=e[u][1][n];return o(t?t:n)},s,s.exports,n,e,t,r)}return t[u].exports}for(var i="function"==typeof require&&require,u=0;u<r.length;u++)o(r[u]);return o}({1:[function(n,e,t){function r(){s=!1,a.length?c=a.concat(c):l=-1,c.length&&o()}function o(){if(!s){var n=setTimeout(r);s=!0;for(var e=c.length;e;){for(a=c,c=[];++l<e;)a&&a[l].run();l=-1,e=c.length}a=null,s=!1,clearTimeout(n)}}function i(n,e){this.fun=n,this.array=e}function u(){}var a,f=e.exports={},c=[],s=!1,l=-1;f.nextTick=function(n){var e=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)e[t-1]=arguments[t];c.push(new i(n,e)),1!==c.length||s||setTimeout(o,0)},i.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=u,f.addListener=u,f.once=u,f.off=u,f.removeListener=u,f.removeAllListeners=u,f.emit=u,f.binding=function(n){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(n){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},{}],2:[function(n,e,t){e.exports=function(n,e){function t(n,r){return n.reduce(function(n,o){return Array.isArray(o)&&e>r?n.concat(t(o,r+1)):n.concat(o)},[])}return e="number"==typeof e?e:1/0,e?t(n,1):Array.isArray(n)?n.map(function(n){return n}):n}},{}],3:[function(n,e,t){(function(n){e.exports=function(e,t){function r(e){function r(){t&&t(e,i),t=null}f?n.nextTick(r):r()}function o(n,e,t){i[n]=t,(0===--u||e)&&r(e)}var i,u,a,f=!0;Array.isArray(e)?(i=[],u=e.length):(a=Object.keys(e),i={},u=a.length),u?a?a.forEach(function(n){e[n](o.bind(void 0,n))}):e.forEach(function(n,e){n(o.bind(void 0,e))}):r(null),f=!1}}).call(this,n("_process"))},{_process:1}],"/":[function(n,e,t){function r(n,e){"string"==typeof n&&(n=window.document.querySelector(n)),"function"==typeof e&&(e={onDrop:e});var t=i(n,e.onDragOver),r=u(n,e.onDragLeave),f=a(n,e.onDrop,e.onDragLeave);return n.addEventListener("dragenter",o,!1),n.addEventListener("dragover",t,!1),n.addEventListener("dragleave",r,!1),n.addEventListener("drop",f,!1),function(){n instanceof window.Element&&n.classList.remove("drag"),n.removeEventListener("dragenter",o,!1),n.removeEventListener("dragover",t,!1),n.removeEventListener("dragleave",r,!1),n.removeEventListener("drop",f,!1)}}function o(n){return n.stopPropagation(),n.preventDefault(),!1}function i(n,e){return function(t){return t.stopPropagation(),t.preventDefault(),n instanceof window.Element&&n.classList.add("drag"),t.dataTransfer.dropEffect="copy",e&&e(t),!1}}function u(n,e){return function(t){return t.target===n?(t.stopPropagation(),t.preventDefault(),e&&e(t),n instanceof window.Element&&n.classList.remove("drag"),!1):void 0}}function a(n,e,t){return function(r){r.stopPropagation(),r.preventDefault(),t&&t(r),n instanceof window.Element&&n.classList.remove("drag");var o={x:r.clientX,y:r.clientY};if(r.dataTransfer.items){var i=c(r.dataTransfer.items).filter(function(n){return"file"===n.kind});if(0===i.length)return;l(i.map(function(n){return function(e){f(n.webkitGetAsEntry(),e)}}),function(n,t){if(n)throw n;e(s(t),o)})}else{var u=c(r.dataTransfer.files);if(0===u.length)return;u.forEach(function(n){n.fullPath="/"+n.name}),e(u,o)}return!1}}function f(n,e){function t(){i.readEntries(function(n){n.length>0?(o=o.concat(c(n)),t()):r()})}function r(){l(o.map(function(n){return function(e){f(n,e)}}),e)}var o=[];if(n.isFile)n.file(function(t){t.fullPath=n.fullPath,e(null,t)},function(n){e(n)});else if(n.isDirectory){var i=n.createReader();t()}}function c(n){return Array.prototype.slice.call(n||[],0)}e.exports=r;var s=n("flatten"),l=n("run-parallel")},{flatten:2,"run-parallel":3}]},{},[])("/")}); |
@@ -48,7 +48,3 @@ module.exports = dragDrop | ||
return function (e) { | ||
if (e.target !== elem) { | ||
var parent = e.target | ||
while (parent !== elem) parent = parent.parentNode | ||
if (!parent) return | ||
} | ||
if (e.target !== elem) return | ||
e.stopPropagation() | ||
@@ -55,0 +51,0 @@ e.preventDefault() |
{ | ||
"name": "drag-drop", | ||
"description": "HTML5 drag & drop for humans", | ||
"version": "2.8.0", | ||
"version": "2.9.0", | ||
"author": "Feross Aboukhadijeh <feross@feross.org> (http://feross.org/)", | ||
@@ -18,3 +18,3 @@ "bugs": { | ||
"node-static": "^0.7.6", | ||
"standard": "^5.4.1", | ||
"standard": "^6.0.5", | ||
"tape": "^4.0.0", | ||
@@ -21,0 +21,0 @@ "uglify-js": "^2.4.15" |
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
4633
16351
165