drag-event-service
Advanced tools
Comparing version 0.0.5 to 0.0.6
/*! | ||
* drag-event-service v0.0.5 | ||
* drag-event-service v0.0.6 | ||
* (c) 2018-present phphe <phphe@outlook.com> (https://github.com/phphe) | ||
@@ -32,5 +32,7 @@ * Released under the MIT License. | ||
var ts = this; | ||
var wrapper = function wrapper(e) { | ||
var mouse; | ||
var isTouch = this.isTouch(e); | ||
var isTouch = ts.isTouch(e); | ||
@@ -37,0 +39,0 @@ if (isTouch) { |
/*! | ||
* drag-event-service v0.0.5 | ||
* drag-event-service v0.0.6 | ||
* (c) 2018-present phphe <phphe@outlook.com> (https://github.com/phphe) | ||
@@ -30,5 +30,7 @@ * Released under the MIT License. | ||
var ts = this; | ||
var wrapper = function wrapper(e) { | ||
var mouse; | ||
var isTouch = this.isTouch(e); | ||
var isTouch = ts.isTouch(e); | ||
@@ -35,0 +37,0 @@ if (isTouch) { |
/*! | ||
* drag-event-service v0.0.5 | ||
* drag-event-service v0.0.6 | ||
* (c) 2018-present phphe <phphe@outlook.com> (https://github.com/phphe) | ||
@@ -403,5 +403,7 @@ * Released under the MIT License. | ||
var ts = this; | ||
var wrapper = function wrapper(e) { | ||
var mouse; | ||
var isTouch = this.isTouch(e); | ||
var isTouch = ts.isTouch(e); | ||
@@ -408,0 +410,0 @@ if (isTouch) { |
/*! | ||
* drag-event-service v0.0.5 | ||
* drag-event-service v0.0.6 | ||
* (c) 2018-present phphe <phphe@outlook.com> (https://github.com/phphe) | ||
* Released under the MIT License. | ||
*/ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.dragEventService=t()}(this,function(){"use strict";function e(e,t,n){for(var r=arguments.length,a=new Array(r>3?r-3:0),o=3;o<r;o++)a[o-3]=arguments[o];e.addEventListener?e.addEventListener.apply(e,[t,n].concat(a)):e.attachEvent&&e.attachEvent.apply(e,["on".concat(t),n].concat(a))}function t(e,t,n){for(var r=arguments.length,a=new Array(r>3?r-3:0),o=3;o<r;o++)a[o-3]=arguments[o];e.removeEventListener?e.removeEventListener.apply(e,[t,n].concat(a)):e.detachEvent&&e.detachEvent.apply(e,["on".concat(t),n].concat(a))}var n={start:["mousedown","touchstart"],move:["mousemove","touchmove"],end:["mouseup","touchend"]};return{isTouch:function(e){return e.type&&e.type.startsWith("touch")},_getStore:function(e){return e._wrapperStore||(e._wrapperStore=[]),e._wrapperStore},on:function(t,r,a){var o,c,p=function(e){var t;if(this.isTouch(e))t={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY};else if(t={x:e.pageX,y:e.pageY},"start"===r&&1!==e.which)return;return a.call(this,e,t)};this._getStore(t).push({handler:a,wrapper:p});for(var l=arguments.length,u=new Array(l>3?l-3:0),i=3;i<l;i++)u[i-3]=arguments[i];(o=e).call.apply(o,[null,t,n[r][0],p].concat(u)),(c=e).call.apply(c,[null,t,n[r][1],p].concat(u))},off:function(e,r,a){for(var o=this._getStore(e),c=arguments.length,p=new Array(c>3?c-3:0),l=3;l<c;l++)p[l-3]=arguments[l];for(var u=o.length-1;u>=0;u--){var i,h,s=o[u],f=s.handler,v=s.wrapper;if(a===f)(i=t).call.apply(i,[null,e,n[r][0],v].concat(p)),(h=t).call.apply(h,[null,e,n[r][1],v].concat(p)),o.splice(u,1)}}}}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.dragEventService=t()}(this,function(){"use strict";function e(e,t,n){for(var r=arguments.length,a=new Array(r>3?r-3:0),o=3;o<r;o++)a[o-3]=arguments[o];e.addEventListener?e.addEventListener.apply(e,[t,n].concat(a)):e.attachEvent&&e.attachEvent.apply(e,["on".concat(t),n].concat(a))}function t(e,t,n){for(var r=arguments.length,a=new Array(r>3?r-3:0),o=3;o<r;o++)a[o-3]=arguments[o];e.removeEventListener?e.removeEventListener.apply(e,[t,n].concat(a)):e.detachEvent&&e.detachEvent.apply(e,["on".concat(t),n].concat(a))}var n={start:["mousedown","touchstart"],move:["mousemove","touchmove"],end:["mouseup","touchend"]};return{isTouch:function(e){return e.type&&e.type.startsWith("touch")},_getStore:function(e){return e._wrapperStore||(e._wrapperStore=[]),e._wrapperStore},on:function(t,r,a){var o,c,p=this,l=function(e){var t;if(p.isTouch(e))t={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY};else if(t={x:e.pageX,y:e.pageY},"start"===r&&1!==e.which)return;return a.call(this,e,t)};this._getStore(t).push({handler:a,wrapper:l});for(var u=arguments.length,i=new Array(u>3?u-3:0),h=3;h<u;h++)i[h-3]=arguments[h];(o=e).call.apply(o,[null,t,n[r][0],l].concat(i)),(c=e).call.apply(c,[null,t,n[r][1],l].concat(i))},off:function(e,r,a){for(var o=this._getStore(e),c=arguments.length,p=new Array(c>3?c-3:0),l=3;l<c;l++)p[l-3]=arguments[l];for(var u=o.length-1;u>=0;u--){var i,h,s=o[u],f=s.handler,v=s.wrapper;if(a===f)(i=t).call.apply(i,[null,e,n[r][0],v].concat(p)),(h=t).call.apply(h,[null,e,n[r][1],v].concat(p)),o.splice(u,1)}}}}); | ||
//# sourceMappingURL=drag-event-service.min.js.map |
{ | ||
"name": "drag-event-service", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/drag-event-service.cjs.js", |
@@ -23,5 +23,6 @@ // support desktop and mobile | ||
const store = this._getStore(el) | ||
const ts = this | ||
const wrapper = function (e) { | ||
let mouse | ||
const isTouch = this.isTouch(e) | ||
const isTouch = ts.isTouch(e) | ||
if (isTouch) { | ||
@@ -28,0 +29,0 @@ // touch |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
76132
625
0