From 68ab5eb3dfa981d16ccb632a8dff015866ca13e2 Mon Sep 17 00:00:00 2001
From: geireann <geireann.lindfield@gmail.com>
Date: Mon, 24 Oct 2022 14:55:44 -0400
Subject: added first draft version of scrolling up and scrolling sideways

---
 src/client/util/SettingsManager.tsx | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

(limited to 'src/client/util/SettingsManager.tsx')

diff --git a/src/client/util/SettingsManager.tsx b/src/client/util/SettingsManager.tsx
index 92032a8f9..5c1c836f7 100644
--- a/src/client/util/SettingsManager.tsx
+++ b/src/client/util/SettingsManager.tsx
@@ -26,6 +26,11 @@ export enum ColorScheme {
     System = '-MatchSystem',
 }
 
+export enum freeformScrollMode {
+    Pan = 'pan',
+    Zoom = 'zoom'
+}
+
 @observer
 export class SettingsManager extends React.Component<{}> {
     public static Instance: SettingsManager;
@@ -302,6 +307,12 @@ export class SettingsManager extends React.Component<{}> {
         );
     }
 
+
+
+    setFreeformScrollMode = (mode: freeformScrollMode) => {
+        Doc.UserDoc().freeformScrollMode = mode;
+    }
+
     @computed get modesContent() {
         return (
             <div className="tab-content modes-content">
@@ -323,6 +334,13 @@ 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>
                 </div>
                 <div className="tab-column">
                     <div className="tab-column-title">Permissions</div>
-- 
cgit v1.2.3-70-g09d2

