@hscmap/magic-trackpad-detector
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -17,7 +17,8 @@ "use strict"; | ||
return false; | ||
for (var i = this.minN; i > 1; --i) { | ||
for (var i = this.minN - 1; i > 1; --i) { | ||
var o = h.at(-i); | ||
var n = h.at(-i + 1); | ||
var dt = n[0] - o[0]; | ||
if (dt < this.interval - this.tolerance || this.interval + this.tolerance < dt) | ||
var dv = n[1] - o[1]; | ||
if (dv != 0 && (dt < this.interval - this.tolerance || this.interval + this.tolerance < dt)) | ||
return false; | ||
@@ -24,0 +25,0 @@ if (n[1] * o[1] < 0 || n[1] / o[1] > 1) |
{ | ||
"name": "@hscmap/magic-trackpad-detector", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"main": "./lib/index.js", | ||
@@ -5,0 +5,0 @@ "types": "./lib/index.d.ts", |
@@ -14,7 +14,8 @@ export class MagicTrackpadDetector { | ||
return false | ||
for (let i = this.minN; i > 1; --i) { | ||
for (let i = this.minN - 1; i > 1; --i) { | ||
const o = h.at(-i) | ||
const n = h.at(-i + 1) | ||
const dt = n[0] - o[0] | ||
if (dt < this.interval - this.tolerance || this.interval + this.tolerance < dt) | ||
const dv = n[1] - o[1] | ||
if (dv != 0 && (dt < this.interval - this.tolerance || this.interval + this.tolerance < dt)) | ||
return false | ||
@@ -21,0 +22,0 @@ if (n[1] * o[1] < 0 || n[1] / o[1] > 1) |
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
145297
227