@any-touch/pinch
Advanced tools
Comparing version 0.6.0-beta.25 to 0.6.0-beta.26
@@ -1,36 +0,1 @@ | ||
'use strict'; | ||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
var tslib = require('tslib'); | ||
var compute = require('@any-touch/compute'); | ||
var Recognizer = require('@any-touch/recognizer'); | ||
var Recognizer__default = _interopDefault(Recognizer); | ||
var PinchRecognizer = (function (_super) { | ||
tslib.__extends(PinchRecognizer, _super); | ||
function PinchRecognizer(options) { | ||
if (options === void 0) { options = {}; } | ||
return _super.call(this, options) || this; | ||
} | ||
PinchRecognizer.prototype.test = function (input) { | ||
var pointLength = input.pointLength; | ||
var scale = this.computed.scale; | ||
return this.isValidPointLength(pointLength) && (this.options.threshold < Math.abs(scale - 1) || this.isRecognized); | ||
}; | ||
PinchRecognizer.prototype.recognize = function (input, emit) { | ||
var computed = this.compute([compute.ComputeVectorForMutli], input); | ||
if ("activeV" in computed) { | ||
this.computed = tslib.__assign(tslib.__assign({}, this.computed), compute.computeScale(computed)); | ||
} | ||
Recognizer.recognizeForPressMoveLike(this, input, emit); | ||
}; | ||
PinchRecognizer.DEFAULT_OPTIONS = { | ||
name: 'pinch', | ||
threshold: 0, | ||
pointLength: 2, | ||
}; | ||
return PinchRecognizer; | ||
}(Recognizer__default)); | ||
module.exports = PinchRecognizer; | ||
if (process.env.NODE_ENV === 'development') {module.exports = require('./index.dev.js');} else {module.exports = require('./index.prod.js');} |
{ | ||
"name": "@any-touch/pinch", | ||
"version": "0.6.0-beta.25", | ||
"version": "0.6.0-beta.26", | ||
"description": "any-touch的识别器, 用来识别捏合手势.", | ||
@@ -11,8 +11,8 @@ "main": "./dist/index", | ||
"peerDependencies": { | ||
"any-touch": "0.6.0-beta.19", | ||
"any-touch": "0.6.0-beta.25", | ||
"tslib": "^1.9.3" | ||
}, | ||
"dependencies": { | ||
"@any-touch/compute": "^0.6.0-beta.25", | ||
"@any-touch/recognizer": "^0.6.0-beta.25" | ||
"@any-touch/compute": "^0.6.0-beta.26", | ||
"@any-touch/recognizer": "^0.6.0-beta.26" | ||
}, | ||
@@ -23,3 +23,3 @@ "publishConfig": { | ||
"sideEffects": false, | ||
"gitHead": "e74ad8975c8dcb86eae8f9c1ef2fa43978b96002" | ||
"gitHead": "134804165dc898584f8a8583947da50f5e0e9462" | ||
} |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
7535
8
123
3
2
+ Added@any-touch/core@0.6.0(transitive)
+ Added@any-touch/pan@0.6.0(transitive)
+ Added@any-touch/press@0.6.0(transitive)
+ Added@any-touch/rotate@0.6.0(transitive)
+ Added@any-touch/swipe@0.6.0(transitive)
+ Added@any-touch/tap@0.6.0(transitive)
+ Addedany-event@0.6.0(transitive)
+ Addedany-touch@0.6.0-beta.25(transitive)