From 4574b7f03ccc85c4bebdbfd9475788456086704f Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Thu, 8 Aug 2024 12:27:40 -0400
Subject: many changes to add typing in place of 'any's etc

---
 src/client/views/InkingStroke.tsx | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

(limited to 'src/client/views/InkingStroke.tsx')

diff --git a/src/client/views/InkingStroke.tsx b/src/client/views/InkingStroke.tsx
index 784d252a3..2e82371cb 100644
--- a/src/client/views/InkingStroke.tsx
+++ b/src/client/views/InkingStroke.tsx
@@ -20,6 +20,7 @@
     
     Most of the operations that can be performed on an InkStroke (eg delete a point, rotate, stretch) are implemented in the InkStrokeProperties helper class
 */
+import { Property } from 'csstype';
 import { action, computed, IReactionDisposer, observable, reaction } from 'mobx';
 import { observer } from 'mobx-react';
 import * as React from 'react';
@@ -28,6 +29,7 @@ import { Doc } from '../../fields/Doc';
 import { InkData, InkField } from '../../fields/InkField';
 import { BoolCast, Cast, NumCast, RTFCast, StrCast } from '../../fields/Types';
 import { TraceMobx } from '../../fields/util';
+import { Gestures } from '../../pen-gestures/GestureTypes';
 import { CognitiveServices } from '../cognitive_services/CognitiveServices';
 import { Docs } from '../documents/Documents';
 import { DocumentType } from '../documents/DocumentTypes';
@@ -35,7 +37,6 @@ import { InteractionUtils } from '../util/InteractionUtils';
 import { SnappingManager } from '../util/SnappingManager';
 import { UndoManager } from '../util/UndoManager';
 import { ContextMenu } from './ContextMenu';
-import { ViewBoxInterface } from './ViewBoxInterface';
 import { ViewBoxAnnotatableComponent } from './DocComponent';
 import { Colors } from './global/globalEnums';
 import { InkControlPtHandles, InkEndPtHandles } from './InkControlPtHandles';
@@ -46,6 +47,7 @@ import { FieldView, FieldViewProps } from './nodes/FieldView';
 import { FormattedTextBox, FormattedTextBoxProps } from './nodes/formattedText/FormattedTextBox';
 import { PinDocView, PinProps } from './PinFuncs';
 import { StyleProp } from './StyleProp';
+import { ViewBoxInterface } from './ViewBoxInterface';
 
 // eslint-disable-next-line @typescript-eslint/no-var-requires
 const { INK_MASK_SIZE } = require('./global/globalCssVariables.module.scss'); // prettier-ignore
@@ -318,8 +320,8 @@ export class InkingStroke extends ViewBoxAnnotatableComponent<FieldViewProps>()
                     Colors.MEDIUM_BLUE,
                     screenInkWidth[0],
                     screenSpaceCenterlineStrokeWidth,
-                    StrCast(inkDoc.stroke_lineJoin),
-                    StrCast(this.layoutDoc.stroke_lineCap),
+                    StrCast(inkDoc.stroke_lineJoin) as Property.StrokeLinejoin,
+                    StrCast(this.layoutDoc.stroke_lineCap) as Property.StrokeLinecap,
                     StrCast(inkDoc.stroke_bezier),
                     'none',
                     startMarker,
@@ -328,7 +330,7 @@ export class InkingStroke extends ViewBoxAnnotatableComponent<FieldViewProps>()
                     StrCast(inkDoc.stroke_dash),
                     1,
                     1,
-                    '',
+                    '' as Gestures,
                     'none',
                     1.0,
                     false
@@ -383,8 +385,8 @@ export class InkingStroke extends ViewBoxAnnotatableComponent<FieldViewProps>()
             this.strokeColor,
             inkStrokeWidth,
             inkStrokeWidth,
-            StrCast(this.layoutDoc.stroke_lineJoin),
-            StrCast(this.layoutDoc.stroke_lineCap),
+            StrCast(this.layoutDoc.stroke_lineJoin) as Property.StrokeLinejoin,
+            StrCast(this.layoutDoc.stroke_lineCap) as Property.StrokeLinecap,
             StrCast(this.layoutDoc.stroke_bezier),
             !closed ? 'none' : fillColor === 'transparent' ? 'none' : fillColor,
             startMarker,
@@ -393,7 +395,7 @@ export class InkingStroke extends ViewBoxAnnotatableComponent<FieldViewProps>()
             StrCast(this.layoutDoc.stroke_dash),
             inkScaleX,
             inkScaleY,
-            '',
+            '' as Gestures,
             'none',
             1.0,
             false,
@@ -410,8 +412,8 @@ export class InkingStroke extends ViewBoxAnnotatableComponent<FieldViewProps>()
                 mask && color === 'transparent' ? this.strokeColor : (highlightColor ?? color),
                 inkStrokeWidth,
                 inkStrokeWidth + NumCast(this.layoutDoc.stroke_borderWidth) + (fillColor ? (closed ? higlightMargin : (highlightIndex ?? 0) + higlightMargin) : higlightMargin),
-                StrCast(this.layoutDoc.stroke_lineJoin),
-                StrCast(this.layoutDoc.stroke_lineCap),
+                StrCast(this.layoutDoc.stroke_lineJoin) as Property.StrokeLinejoin,
+                StrCast(this.layoutDoc.stroke_lineCap) as Property.StrokeLinecap,
                 StrCast(this.layoutDoc.stroke_bezier),
                 !closed || !fillColor || DashColor(fillColor).alpha() === 0 ? 'none' : fillColor,
                 startMarker,
@@ -420,7 +422,7 @@ export class InkingStroke extends ViewBoxAnnotatableComponent<FieldViewProps>()
                 StrCast(this.layoutDoc.stroke_dash),
                 inkScaleX,
                 inkScaleY,
-                '',
+                '' as Gestures,
                 this._props.pointerEvents?.() ?? 'visiblePainted',
                 0.0,
                 false,
-- 
cgit v1.2.3-70-g09d2

