From e373e66f8ed06f4501e00af8348f15ad113c7424 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Wed, 21 Dec 2022 11:11:39 -0500
Subject: cleaning up ACLs for performance and clarity

---
 .../views/collections/collectionFreeForm/CollectionFreeFormView.tsx    | 3 ---
 1 file changed, 3 deletions(-)

(limited to 'src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx')

diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
index 945614bcb..d59cec02d 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
@@ -806,9 +806,6 @@ export class CollectionFreeFormView extends CollectionSubView<Partial<collection
                         p2: { x: currPointInkSpace.X, y: currPointInkSpace.Y },
                     });
                     const intersects = Array.from(new Set(rawIntersects as (number | string)[])); // convert to more manageable union array type
-                    if (intersects.length) {
-                        console.log();
-                    }
                     // return tuples of the inkingStroke intersected, and the t value of the intersection
                     intersections.push(...intersects.map(t => ({ inkView, t: +t + Math.floor(i / 4) }))); // convert string t's to numbers and add start of curve segment to convert from local t value to t value along complete curve
                 }
-- 
cgit v1.2.3-70-g09d2


From a6f34fd4b67b863a85aab8fae0a2bd06a1decdc8 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Fri, 23 Dec 2022 17:30:51 -0500
Subject: fixed scroll  pan vs. zoom option and ui

---
 src/client/util/SettingsManager.scss               | 16 ++++---------
 src/client/util/SettingsManager.tsx                | 26 +++++++++++++---------
 .../collectionFreeForm/CollectionFreeFormView.tsx  |  2 +-
 3 files changed, 21 insertions(+), 23 deletions(-)

(limited to 'src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx')

diff --git a/src/client/util/SettingsManager.scss b/src/client/util/SettingsManager.scss
index b7199f433..1289ca2b4 100644
--- a/src/client/util/SettingsManager.scss
+++ b/src/client/util/SettingsManager.scss
@@ -1,4 +1,4 @@
-@import "../views/global/globalCssVariables";
+@import '../views/global/globalCssVariables';
 
 .settings-interface {
     //background-color: whitesmoke !important;
@@ -59,7 +59,6 @@
     }
 }
 
-
 .password-content {
     display: flex;
     flex-direction: column;
@@ -76,7 +75,6 @@
             color: black;
             border-radius: 5px;
             padding: 7px;
-
         }
     }
 
@@ -148,7 +146,6 @@
             margin-top: 2;
             text-align: left;
         }
-
     }
 }
 
@@ -297,9 +294,8 @@
         margin-bottom: 10px;
     }
 
-
     .error-text {
-        color: #C40233;
+        color: #c40233;
         width: 300;
         margin-left: -20;
         font-size: 10;
@@ -313,7 +309,7 @@
         font-size: 10;
         margin-bottom: 4;
         margin-top: -3;
-        color: #009F6B;
+        color: #009f6b;
     }
 
     .focus-span {
@@ -352,7 +348,6 @@
             padding: 0 0 0 20px;
             color: black;
         }
-
     }
 }
 
@@ -421,7 +416,6 @@
 
 .tab-content {
     display: flex;
-    margin: 20px 0;
 
     .tab-column {
         flex: 0 0 50%;
@@ -437,9 +431,7 @@
         .tab-column-content {
             padding-left: 16px;
         }
-
     }
-
 }
 
 .tab-column button {
@@ -465,4 +457,4 @@
     .settings-interface .settings-heading {
         font-size: 25;
     }
-}
\ No newline at end of file
+}
diff --git a/src/client/util/SettingsManager.tsx b/src/client/util/SettingsManager.tsx
index 5c1c836f7..a3d76591f 100644
--- a/src/client/util/SettingsManager.tsx
+++ b/src/client/util/SettingsManager.tsx
@@ -28,7 +28,7 @@ export enum ColorScheme {
 
 export enum freeformScrollMode {
     Pan = 'pan',
-    Zoom = 'zoom'
+    Zoom = 'zoom',
 }
 
 @observer
@@ -307,11 +307,9 @@ export class SettingsManager extends React.Component<{}> {
         );
     }
 
-
-
     setFreeformScrollMode = (mode: freeformScrollMode) => {
         Doc.UserDoc().freeformScrollMode = mode;
-    }
+    };
 
     @computed get modesContent() {
         return (
@@ -334,12 +332,20 @@ export class SettingsManager extends React.Component<{}> {
                             <div className="playground-text">Playground Mode</div>
                         </div>
                     </div>
-                    <div className="tab-column-title">Freeform scroll mode</div>
-                    <div>
-                        <button onClick={() => this.setFreeformScrollMode(freeformScrollMode.Pan)}>Scroll to pan</button>
-                        <div>Scrolling pans around the freeform, holding shift and scrolling zooms in and out.</div>
-                        <button onClick={() => this.setFreeformScrollMode(freeformScrollMode.Zoom)}>Scroll to zoom</button>
-                        <div>Scrolling zooms in and out of canvas</div>
+                    <div className="tab-column-title" style={{ marginTop: 10, marginBottom: 0 }}>
+                        Freeform scrolling
+                    </div>
+                    <div className="tab-column-content">
+                        <button style={{ backgroundColor: Doc.UserDoc().freeformScrollMode === freeformScrollMode.Pan ? 'blue' : '' }} onClick={() => this.setFreeformScrollMode(freeformScrollMode.Pan)}>
+                            Scroll to pan
+                        </button>
+                        <div>
+                            <div>Scrolling pans canvas, shift + scrolling zooms</div>
+                        </div>
+                        <button style={{ backgroundColor: Doc.UserDoc().freeformScrollMode === freeformScrollMode.Zoom ? 'blue' : '' }} onClick={() => this.setFreeformScrollMode(freeformScrollMode.Zoom)}>
+                            Scroll to zoom
+                        </button>
+                        <div>Scrolling zooms canvas</div>
                     </div>
                 </div>
                 <div className="tab-column">
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
index e8f382251..82b97dff0 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
@@ -1019,7 +1019,7 @@ export class CollectionFreeFormView extends CollectionSubView<Partial<collection
         if (this.layoutDoc._Transform || DocListCast(Doc.MyOverlayDocs?.data).includes(this.props.Document) || this.props.Document.treeViewOutlineMode === TreeViewType.outline) return;
         e.stopPropagation();
         e.preventDefault();
-        switch (!e.ctrlKey ? freeformScrollMode.Pan : Doc.UserDoc().freeformScrollMode) {
+        switch (!e.ctrlKey ? Doc.UserDoc().freeformScrollMode : freeformScrollMode.Pan) {
             case freeformScrollMode.Pan:
                 // if shift is selected then zoom
                 if (e.ctrlKey) {
-- 
cgit v1.2.3-70-g09d2

