From b8d9c7ad67191316b764cf18eb2fc666592fb6b3 Mon Sep 17 00:00:00 2001 From: Zachary Zhang Date: Wed, 24 Jul 2024 13:16:52 -0400 Subject: ndollar stroke data useless --- src/client/views/GestureOverlay.tsx | 24 +++++++++++++++++++++++- src/client/views/InkTranscription.tsx | 21 ++++++++++++++++++--- 2 files changed, 41 insertions(+), 4 deletions(-) (limited to 'src/client') diff --git a/src/client/views/GestureOverlay.tsx b/src/client/views/GestureOverlay.tsx index e961bc031..dd80418c8 100644 --- a/src/client/views/GestureOverlay.tsx +++ b/src/client/views/GestureOverlay.tsx @@ -150,6 +150,7 @@ export class GestureOverlay extends ObservableReactComponent 2 && GestureUtils.GestureRecognizer.Recognize([points]); console.log(points); + console.log(this.getNumberOfCusps(points)); let actionPerformed = false; console.log(result); if (Doc.UserDoc().recognizeGestures && result && result.Score > 0.7) { @@ -201,7 +202,28 @@ export class GestureOverlay extends ObservableReactComponent { const xs = this._points.map(p => p.X); const ys = this._points.map(p => p.Y); diff --git a/src/client/views/InkTranscription.tsx b/src/client/views/InkTranscription.tsx index 3f90df7d1..a7af11463 100644 --- a/src/client/views/InkTranscription.tsx +++ b/src/client/views/InkTranscription.tsx @@ -114,6 +114,7 @@ export class InkTranscription extends React.Component { const validInks = inkDocs.filter(s => s.type === DocumentType.INK); const strokes: InkData[] = []; + const times: number[] = []; validInks .filter(i => Cast(i[Doc.LayoutFieldKey(i)], InkField)) @@ -124,8 +125,22 @@ export class InkTranscription extends React.Component { times.push(DateCast(i.author_date).getDate().getTime()); }); console.log(strokes); - console.log(this.convertPointsToString(strokes)); - console.log(this.convertPointsToString2(strokes)); + console.log( + `this.Multistrokes.push( + new Multistroke( + Gestures.Scribble, + useBoundedRotationInvariance, + new Array([ + ` + + this.convertPointsToString(strokes) + + ` + ]) + ) + ) + ` + ); + //console.log(this.convertPointsToString(strokes)); + //console.log(this.convertPointsToString2(strokes)); this.currGroup = groupDoc; const pointerData = strokes.map((stroke, i) => this.inkJSON(stroke, times[i])); const processGestures = false; @@ -137,7 +152,7 @@ export class InkTranscription extends React.Component { } }; convertPointsToString(points: InkData[]): string { - return points[0].map(point => `new Point(${point.X}, ${point.Y})`).join(',\n '); + return points[0].map(point => `new Point(${point.X}, ${point.Y})`).join(','); } convertPointsToString2(points: InkData[]): string { return points[0].map(point => `(${point.X},${point.Y})`).join(','); -- cgit v1.2.3-70-g09d2