diff options
author | geireann <geireann.lindfield@gmail.com> | 2022-10-31 14:33:42 -0400 |
---|---|---|
committer | geireann <geireann.lindfield@gmail.com> | 2022-10-31 14:33:42 -0400 |
commit | 85f9dd5b114ed44a13c11eeded12666f0d7e7be2 (patch) | |
tree | b6bbdd3319312eb26dce931c7b5ab0c6514e84d3 /src/client/util/SettingsManager.tsx | |
parent | aaf2c5fb4c0b6c6063f824eda3ff29c3bf18d2c4 (diff) | |
parent | 70c998562c8560283a7d6b9a1ae78b9207e3720f (diff) |
Merge branch 'master' of https://github.com/brown-dash/Dash-Web
Diffstat (limited to 'src/client/util/SettingsManager.tsx')
-rw-r--r-- | src/client/util/SettingsManager.tsx | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/client/util/SettingsManager.tsx b/src/client/util/SettingsManager.tsx index a185c8936..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; @@ -186,6 +191,10 @@ export class SettingsManager extends React.Component<{}> { <input type="checkbox" onChange={e => FontIconBox.SetShowLabels(!FontIconBox.GetShowLabels())} checked={FontIconBox.GetShowLabels()} /> <div className="preferences-check">Show button labels</div> </div> + <div> + <input type="checkbox" onChange={e => FontIconBox.SetRecognizeGesturs(!FontIconBox.GetRecognizeGestures())} checked={FontIconBox.GetRecognizeGestures()} /> + <div className="preferences-check">Recognize ink Gesturs</div> + </div> </div> ); } @@ -298,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"> @@ -319,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> |