@interactjs/pointer-events
Advanced tools
Comparing version 1.10.13 to 1.10.14
{ | ||
"name": "@interactjs/pointer-events", | ||
"version": "1.10.13", | ||
"version": "1.10.14", | ||
"main": "index", | ||
@@ -12,7 +12,7 @@ "module": "index", | ||
"peerDependencies": { | ||
"@interactjs/core": "1.10.13", | ||
"@interactjs/utils": "1.10.13" | ||
"@interactjs/core": "1.10.14", | ||
"@interactjs/utils": "1.10.14" | ||
}, | ||
"optionalDependencies": { | ||
"@interactjs/interact": "1.10.13" | ||
"@interactjs/interact": "1.10.14" | ||
}, | ||
@@ -19,0 +19,0 @@ "publishConfig": { |
@@ -25,5 +25,6 @@ import { BaseEvent } from "../core/BaseEvent.js"; | ||
const interval = this.timeStamp - interaction.tapTime; | ||
this.double = !!(interaction.prevTap && interaction.prevTap.type !== 'doubletap' && interaction.prevTap.target === this.target && interval < 500); | ||
this.double = !!interaction.prevTap && interaction.prevTap.type !== 'doubletap' && interaction.prevTap.target === this.target && interval < 500; | ||
} else if (type === 'doubletap') { | ||
this.dt = pointer.timeStamp - interaction.tapTime; | ||
this.double = true; | ||
} | ||
@@ -30,0 +31,0 @@ } |
@@ -1,2 +0,2 @@ | ||
import{BaseEvent as t}from"../core/BaseEvent.prod.js";import*as e from"../utils/pointerUtils.prod.js";export default class i extends t{constructor(t,i,s,r,p,n){if(super(p),e.pointerExtend(this,s),s!==i&&e.pointerExtend(this,i),this.timeStamp=n,this.originalEvent=s,this.type=t,this.pointerId=e.getPointerId(i),this.pointerType=e.getPointerType(i),this.target=r,this.currentTarget=null,"tap"===t){const t=p.getPointerIndex(i);this.dt=this.timeStamp-p.pointers[t].downTime;const e=this.timeStamp-p.tapTime;this.double=!!(p.prevTap&&"doubletap"!==p.prevTap.type&&p.prevTap.target===this.target&&e<500)}else"doubletap"===t&&(this.dt=i.timeStamp-p.tapTime)}_subtractOrigin({x:t,y:e}){return this.pageX-=t,this.pageY-=e,this.clientX-=t,this.clientY-=e,this}_addOrigin({x:t,y:e}){return this.pageX+=t,this.pageY+=e,this.clientX+=t,this.clientY+=e,this}preventDefault(){this.originalEvent.preventDefault()}}export{i as PointerEvent}; | ||
import{BaseEvent as t}from"../core/BaseEvent.prod.js";import*as e from"../utils/pointerUtils.prod.js";export default class i extends t{constructor(t,i,s,r,p,n){if(super(p),e.pointerExtend(this,s),s!==i&&e.pointerExtend(this,i),this.timeStamp=n,this.originalEvent=s,this.type=t,this.pointerId=e.getPointerId(i),this.pointerType=e.getPointerType(i),this.target=r,this.currentTarget=null,"tap"===t){const t=p.getPointerIndex(i);this.dt=this.timeStamp-p.pointers[t].downTime;const e=this.timeStamp-p.tapTime;this.double=!!p.prevTap&&"doubletap"!==p.prevTap.type&&p.prevTap.target===this.target&&e<500}else"doubletap"===t&&(this.dt=i.timeStamp-p.tapTime,this.double=!0)}_subtractOrigin({x:t,y:e}){return this.pageX-=t,this.pageY-=e,this.clientX-=t,this.clientY-=e,this}_addOrigin({x:t,y:e}){return this.pageX+=t,this.pageY+=e,this.clientX+=t,this.clientY+=e,this}preventDefault(){this.originalEvent.preventDefault()}}export{i as PointerEvent}; | ||
//# sourceMappingURL=PointerEvent.prod.js.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
598
82961