From 16c2a900e9116474caa67e4d5de15e2c51477292 Mon Sep 17 00:00:00 2001
From: vkalev <vjk1883@gmail.com>
Date: Tue, 27 Jul 2021 18:54:53 -0400
Subject: changing format of controls/handles + adding color enums

---
 src/client/views/InkHandles.tsx | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

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

diff --git a/src/client/views/InkHandles.tsx b/src/client/views/InkHandles.tsx
index 28b6dd820..6e890e184 100644
--- a/src/client/views/InkHandles.tsx
+++ b/src/client/views/InkHandles.tsx
@@ -10,6 +10,7 @@ import { Doc } from "../../fields/Doc";
 import { listSpec } from "../../fields/Schema";
 import { List } from "../../fields/List";
 import { Cast } from "../../fields/Types";
+import { Colors } from "./global/globalEnums";
 
 export interface InkHandlesProps {
     inkDoc: Doc;
@@ -80,7 +81,7 @@ export class InkHandles extends React.Component<InkHandlesProps> {
                 handleLines.push({ X1: data[i].X, Y1: data[i].Y, X2: data[i + 1].X, Y2: data[i + 1].Y, X3: data[i + 3].X, Y3: data[i + 3].Y, dot1: i + 1, dot2: i + 2 });
             }
         }
-        const [left, top, scaleX, scaleY, strokeWidth, dotsize] = this.props.format;
+        const [left, top, scaleX, scaleY, strokeWidth] = this.props.format;
 
         return (
             <>
@@ -91,7 +92,7 @@ export class InkHandles extends React.Component<InkHandlesProps> {
                             cy={(pts.Y - top - strokeWidth / 2) * scaleY + strokeWidth / 2}
                             r={strokeWidth / 2}
                             strokeWidth={0}
-                            fill="#1F85DE"
+                            fill={Colors.MEDIUM_BLUE}
                             onPointerDown={(e) => this.onHandleDown(e, pts.I)}
                             pointerEvents="all"
                             cursor="default"
@@ -104,16 +105,16 @@ export class InkHandles extends React.Component<InkHandlesProps> {
                             y1={(pts.Y1 - top - strokeWidth / 2) * scaleY + strokeWidth / 2}
                             x2={(pts.X2 - left - strokeWidth / 2) * scaleX + strokeWidth / 2}
                             y2={(pts.Y2 - top - strokeWidth / 2) * scaleY + strokeWidth / 2}
-                            stroke="#1F85DE"
-                            strokeWidth={dotsize / 8}
+                            stroke={Colors.MEDIUM_BLUE}
+                            strokeWidth={strokeWidth / 4}
                             display={(pts.dot1 === formatInstance._currentPoint || pts.dot2 === formatInstance._currentPoint) ? "inherit" : "none"} />
                         <line
                             x1={(pts.X2 - left - strokeWidth / 2) * scaleX + strokeWidth / 2}
                             y1={(pts.Y2 - top - strokeWidth / 2) * scaleY + strokeWidth / 2}
                             x2={(pts.X3 - left - strokeWidth / 2) * scaleX + strokeWidth / 2}
                             y2={(pts.Y3 - top - strokeWidth / 2) * scaleY + strokeWidth / 2}
-                            stroke="#1F85DE"
-                            strokeWidth={dotsize / 8}
+                            stroke={Colors.MEDIUM_BLUE}
+                            strokeWidth={strokeWidth / 4}
                             display={(pts.dot1 === formatInstance._currentPoint || pts.dot2 === formatInstance._currentPoint) ? "inherit" : "none"} />
                     </svg>)}
             </>
-- 
cgit v1.2.3-70-g09d2

