aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/util/SettingsManager.scss16
-rw-r--r--src/client/util/SettingsManager.tsx26
-rw-r--r--src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx2
3 files changed, 21 insertions, 23 deletions
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) {