Socket
Socket
Sign inDemoInstall

@any-touch/pinch

Package Overview
Dependencies
4
Maintainers
1
Versions
79
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.1.1 to 2.1.2

2

dist/index.es.js

@@ -1,2 +0,2 @@

import{createPluginContext as t,resetState as e,isDisabled as n,isRecognized as o,TYPE_END as a,TYPE_CANCEL as s,flow as c,getStatusName as i}from"@any-touch/shared";import{ComputeVectorForMutli as h,ComputeScale as r}from"@any-touch/compute";const u={name:"pinch",threshold:0,pointLength:2};function m(m,p){const d=t(u,p);return m.compute([h,r],(t=>{if(e(d),n(d))return;const h=function(){const{pointLength:e,scale:n,deltaScale:c,phase:i}=t;return d.pointLength===e&&(void 0!==n&&void 0!==c&&d.threshold<Math.abs(n-1)||o(d.state))||o(d.state)&&[a,s].includes(i)}();d.state=c(h,d.state,t.phase);const{name:r}=d;if(h){m.emit2(r,t,d);const{deltaScale:e}=t;1!==e&&m.emit2(r+(1<e?"in":"out"),t,d)}const u=i(d.state);u&&m.emit2(r+u,t,d)})),d}export{m as default};
import{createPluginContext as t,resetState as e,isDisabled as n,flow as o,isMoveOrEndOrCancel as a,getStatusName as s}from"@any-touch/shared";import{ComputeVectorForMutli as c,ComputeScale as h}from"@any-touch/compute";const i={name:"pinch",threshold:0,pointLength:2};function r(r,m){const p=t(i,m);return r.compute([c,h],(t=>{if(e(p),n(p))return;const c=function(){const{pointLength:e,scale:n,deltaScale:o,phase:a}=t;return p.pointLength===e&&p.threshold<Math.abs(n-1)}();p.state=o(c,p.state,t.phase);const{name:h}=p;if(c||a(p.state)){r.emit2(h,t,p);const{deltaScale:e}=t;1!==e&&r.emit2(h+(1<e?"in":"out"),t,p)}const i=s(p.state);i&&r.emit2(h+i,t,p)})),p}export{r as default};
//# sourceMappingURL=index.es.js.map

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@any-touch/shared"),t=require("@any-touch/compute"),a={name:"pinch",threshold:0,pointLength:2};exports.default=function(i,o){var r=e.createPluginContext(a,o);return i.compute([t.ComputeVectorForMutli,t.ComputeScale],(function(t){if(e.resetState(r),!e.isDisabled(r)){var a=function(){var a=t.pointLength,i=t.scale,o=t.deltaScale,n=t.phase;return r.pointLength===a&&(void 0!==i&&void 0!==o&&r.threshold<Math.abs(i-1)||e.isRecognized(r.state))||e.isRecognized(r.state)&&[e.TYPE_END,e.TYPE_CANCEL].includes(n)}();r.state=e.flow(a,r.state,t.phase);var o=r.name;if(a){i.emit2(o,t,r);var n=t.deltaScale;1!==n&&i.emit2(o+(1<n?"in":"out"),t,r)}var s=e.getStatusName(r.state);s&&i.emit2(o+s,t,r)}})),r};
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@any-touch/shared"),t=require("@any-touch/compute"),a={name:"pinch",threshold:0,pointLength:2};exports.default=function(r,o){var n=e.createPluginContext(a,o);return r.compute([t.ComputeVectorForMutli,t.ComputeScale],(function(t){if(e.resetState(n),!e.isDisabled(n)){var a,o,i=(a=t.pointLength,o=t.scale,t.deltaScale,t.phase,n.pointLength===a&&n.threshold<Math.abs(o-1));n.state=e.flow(i,n.state,t.phase);var s=n.name;if(i||e.isMoveOrEndOrCancel(n.state)){r.emit2(s,t,n);var u=t.deltaScale;1!==u&&r.emit2(s+(1<u?"in":"out"),t,n)}var c=e.getStatusName(n.state);c&&r.emit2(s+c,t,n)}})),n};
//# sourceMappingURL=index.js.map
{
"name": "@any-touch/pinch",
"version": "2.1.1",
"version": "2.1.2",
"description": "any-touch的识别器, 用来识别捏合手势.",

@@ -14,3 +14,3 @@ "main": "./dist/index",

"dependencies": {
"@any-touch/compute": "^2.1.1"
"@any-touch/compute": "^2.1.2"
},

@@ -21,3 +21,3 @@ "publishConfig": {

"sideEffects": false,
"gitHead": "2fade0e51434207d1589fefa513139f78a4e9319"
"gitHead": "addeef26823e8840b1915cacd995b3026299e5b5"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc