@any-touch/swipe
Advanced tools
Comparing version 2.0.2 to 2.0.3-alpha.0
@@ -1,2 +0,2 @@ | ||
import{createPluginContext as t,TYPE_END as e}from"@any-touch/shared";import{ComputeDistance as n,ComputeVAndDir as o,ComputeMaxLength as i}from"@any-touch/compute";var a={name:"swipe",threshold:10,velocity:.3,pointLength:1};function r(r,c){var h=t(a,c);return r.compute([n,o,i],(function(t){if(h.state=0,!h.disabled&&function(){if(e!==t.phase)return!1;var n=t.velocityX,o=t.velocityY,i=t.distance;return t.maxPointLength===h.pointLength&&0===t.points.length&&h.threshold<i&&h.velocity<Math.max(n,o)}()){var n=h.name;h.state=1,r.emit2(n,t,h),r.emit2(n+t.direction,t,h)}})),h}export{r as default}; | ||
import{createPluginContext as t,TYPE_END as e}from"@any-touch/shared";import{ComputeDistance as o,ComputeVAndDir as n,ComputeMaxLength as i}from"@any-touch/compute";const c={name:"swipe",threshold:10,velocity:.3,pointLength:1};function a(a,r){const s=t(c,r);return a.compute([o,n,i],(t=>{if(s.state=0,!s.disabled&&function(){if(e!==t.phase)return!1;const{velocityX:o,velocityY:n,distance:i,maxPointLength:c}=t;return c===s.pointLength&&0===t.points.length&&s.threshold<i&&s.velocity<Math.max(o,n)}()){const{name:e}=s;s.state=1,a.emit2(e,t,s),a.emit2(e+t.direction,t,s)}})),s}export{a as default}; | ||
//# sourceMappingURL=index.es.js.map |
{ | ||
"name": "@any-touch/swipe", | ||
"version": "2.0.2", | ||
"version": "2.0.3-alpha.0", | ||
"description": "any-touch的识别器, 用来识别划动手势.", | ||
@@ -11,4 +11,4 @@ "main": "./dist/index.js", | ||
"dependencies": { | ||
"@any-touch/compute": "^2.0.2", | ||
"@any-touch/shared": "^2.0.2" | ||
"@any-touch/compute": "^2.0.3-alpha.0", | ||
"@any-touch/shared": "^2.0.3-alpha.0" | ||
}, | ||
@@ -22,3 +22,3 @@ "files": [ | ||
"sideEffects": false, | ||
"gitHead": "7df4617ecb8b89c720ce9747cdd77554c4966a88" | ||
"gitHead": "e53ab5c44a400b04b0de853a9358303007f67e8e" | ||
} |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
6642
3