drag-event-service
Advanced tools
Comparing version 0.0.2 to 0.0.3
/*! | ||
* drag-event-service v0.0.2 | ||
* drag-event-service v0.0.3 | ||
* (c) 2018-present phphe <phphe@outlook.com> (https://github.com/phphe) | ||
@@ -69,6 +69,6 @@ * Released under the MIT License. | ||
var _store$i = store[i], | ||
_handler = _store$i.handler, | ||
handler2 = _store$i.handler, | ||
wrapper = _store$i.wrapper; | ||
if (_handler === _handler) { | ||
if (handler === handler2) { | ||
hp.offDOM(el, eventName, wrapper); | ||
@@ -75,0 +75,0 @@ store.splice(i, 1); |
/*! | ||
* drag-event-service v0.0.2 | ||
* drag-event-service v0.0.3 | ||
* (c) 2018-present phphe <phphe@outlook.com> (https://github.com/phphe) | ||
@@ -67,6 +67,6 @@ * Released under the MIT License. | ||
var _store$i = store[i], | ||
_handler = _store$i.handler, | ||
handler2 = _store$i.handler, | ||
wrapper = _store$i.wrapper; | ||
if (_handler === _handler) { | ||
if (handler === handler2) { | ||
offDOM(el, eventName, wrapper); | ||
@@ -73,0 +73,0 @@ store.splice(i, 1); |
/*! | ||
* drag-event-service v0.0.2 | ||
* drag-event-service v0.0.3 | ||
* (c) 2018-present phphe <phphe@outlook.com> (https://github.com/phphe) | ||
@@ -456,6 +456,6 @@ * Released under the MIT License. | ||
var _store$i = store$$1[i], | ||
_handler = _store$i.handler, | ||
handler2 = _store$i.handler, | ||
wrapper = _store$i.wrapper; | ||
if (_handler === _handler) { | ||
if (handler === handler2) { | ||
offDOM(el, eventName, wrapper); | ||
@@ -462,0 +462,0 @@ store$$1.splice(i, 1); |
/*! | ||
* drag-event-service v0.0.2 | ||
* drag-event-service v0.0.3 | ||
* (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";var e;try{e=global}catch(t){e=window}function t(e,t,n){e.addEventListener?e.addEventListener(t,n):e.attachEvent&&e.attachEvent("on".concat(t),n)}function n(e,t,n){e.removeEventListener?e.removeEventListener(t,n):e.detachEvent&&e.detachEvent("on".concat(t),n)}function r(e){return{storage:e,set:function(e,t,n){null==t?this.storage.removeItem(e):this.storage.setItem(e,JSON.stringify({value:t,expired_at:n&&(new Date).getTime()/1e3+60*n}))},get:function(e){var t=this.storage.getItem(e);if(t){if(!(t=JSON.parse(t)).expired_at||t.expired_at>(new Date).getTime())return t.value;this.storage.removeItem(e)}return null},clear:function(){this.storage.clear()}}}r(e.localStorage),r(e.sessionStorage);var o={start:["mousedown","touchstart"],move:["mousemove","touchmove"],end:["mouseup","touchend"]};return{canTouch:function(){return"ontouchstart"in document.documentElement},_getStore:function(e){return e._wrapperStore||(e._wrapperStore=[]),e._wrapperStore},on:function(e,n,r){var a=this._getStore(e),i=this.canTouch(),c=function(e){var t;if(i)t={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY};else{if("start"===n&&1!==e.which)return;t={x:e.pageX,y:e.pageY}}return r.call(this,e,t)};a.push({handler:r,wrapper:c}),t(e,o[n][i?1:0],c)},off:function(e,t,r){for(var a=this._getStore(e),i=this.canTouch(),c=o[t][i?1:0],u=a.length-1;u>=0;u--){var s=a[u],h=s.handler,f=s.wrapper;h==h&&(n(e,c,f),a.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";var e;try{e=global}catch(t){e=window}function t(e,t,n){e.addEventListener?e.addEventListener(t,n):e.attachEvent&&e.attachEvent("on".concat(t),n)}function n(e,t,n){e.removeEventListener?e.removeEventListener(t,n):e.detachEvent&&e.detachEvent("on".concat(t),n)}function r(e){return{storage:e,set:function(e,t,n){null==t?this.storage.removeItem(e):this.storage.setItem(e,JSON.stringify({value:t,expired_at:n&&(new Date).getTime()/1e3+60*n}))},get:function(e){var t=this.storage.getItem(e);if(t){if(!(t=JSON.parse(t)).expired_at||t.expired_at>(new Date).getTime())return t.value;this.storage.removeItem(e)}return null},clear:function(){this.storage.clear()}}}r(e.localStorage),r(e.sessionStorage);var o={start:["mousedown","touchstart"],move:["mousemove","touchmove"],end:["mouseup","touchend"]};return{canTouch:function(){return"ontouchstart"in document.documentElement},_getStore:function(e){return e._wrapperStore||(e._wrapperStore=[]),e._wrapperStore},on:function(e,n,r){var a=this._getStore(e),i=this.canTouch(),c=function(e){var t;if(i)t={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY};else{if("start"===n&&1!==e.which)return;t={x:e.pageX,y:e.pageY}}return r.call(this,e,t)};a.push({handler:r,wrapper:c}),t(e,o[n][i?1:0],c)},off:function(e,t,r){for(var a=this._getStore(e),i=this.canTouch(),c=o[t][i?1:0],u=a.length-1;u>=0;u--){var s=a[u],h=s.handler,f=s.wrapper;r===h&&(n(e,c,f),a.splice(u,1))}}}}); | ||
//# sourceMappingURL=drag-event-service.min.js.map |
{ | ||
"name": "drag-event-service", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "", | ||
@@ -27,2 +27,2 @@ "main": "dist/drag-event-service.cjs.js", | ||
"license": "MIT" | ||
} | ||
} |
@@ -45,4 +45,4 @@ // support desktop and mobile | ||
for (let i = store.length - 1; i >= 0; i--) { | ||
const {handler, wrapper} = store[i] | ||
if (handler === handler) { | ||
const {handler: handler2, wrapper} = store[i] | ||
if (handler === handler2) { | ||
hp.offDOM(el, eventName, wrapper) | ||
@@ -49,0 +49,0 @@ store.splice(i, 1) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
65584
0