aboutsummaryrefslogtreecommitdiff
path: root/src/pen-gestures/ndollar.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/pen-gestures/ndollar.ts')
-rw-r--r--src/pen-gestures/ndollar.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pen-gestures/ndollar.ts b/src/pen-gestures/ndollar.ts
index 5f1ea00dc..bdb79b446 100644
--- a/src/pen-gestures/ndollar.ts
+++ b/src/pen-gestures/ndollar.ts
@@ -309,7 +309,7 @@ export class NDollarRecognizer {
//
}
- Recognize = (strokes: any[], useBoundedRotationInvariance: boolean = false, requireSameNoOfStrokes: boolean = false, useProtractor: boolean = true) => {
+ Recognize = (strokes: { X: number; Y: number }[][], useBoundedRotationInvariance: boolean = false, requireSameNoOfStrokes: boolean = false, useProtractor: boolean = true) => {
const t0 = Date.now();
const points = CombineStrokes(strokes); // make one connected unistroke from the given strokes
const candidate = new Unistroke('', useBoundedRotationInvariance, points);
@@ -415,9 +415,9 @@ function MakeUnistrokes(strokes: any, orders: any[]) {
return unistrokes;
}
-function CombineStrokes(strokes: any[]) {
+function CombineStrokes(strokes: { X: number; Y: number }[][]) {
const points: Point[] = [];
- strokes.forEach(stroke => stroke.forEach((X: any, Y: any) => points.push(new Point(X, Y))));
+ strokes.forEach(stroke => stroke.forEach(({ X, Y }) => points.push(new Point(X, Y))));
return points;
}
function Resample(points: any, n: any) {