aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/MainView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-09-01 12:25:34 -0400
committerbobzel <zzzman@gmail.com>2020-09-01 12:25:34 -0400
commita55c1ef0211cef68bebdb83b7ee8723c7bcf6edc (patch)
treea1fbd2f4c138decaea8236d8a19e803ac7a76987 /src/client/views/MainView.tsx
parenta4555fb8d5cd64482dd8431aad03878cb173f688 (diff)
fixed tabs to never select/switch on hover unless dragging. fixed display of highlight icons in menu bar. fixed placement of docDecorations level selector.
Diffstat (limited to 'src/client/views/MainView.tsx')
-rw-r--r--src/client/views/MainView.tsx18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx
index 01df10aa0..7dddd1669 100644
--- a/src/client/views/MainView.tsx
+++ b/src/client/views/MainView.tsx
@@ -285,7 +285,7 @@ export class MainView extends React.Component {
setupMoveUpEvents(this, e,
action(e => (this._flyoutWidth = Math.max(e.clientX - 58, 0)) ? false : false),
() => this._flyoutWidth < 5 && this.closeFlyout(),
- this.toggleFlyout);
+ this.closeFlyout);
}
flyoutWidthFunc = () => this._flyoutWidth;
@@ -382,11 +382,7 @@ export class MainView extends React.Component {
SearchBox.Instance.enter(undefined);
break;
default:
- this._sidebarContent.proto = button.target as any;
- closed && this.expandFlyout();
- button._backgroundColor = "lightgrey";
- button.color = "black";
- this._lastButton = button;
+ closed && this.expandFlyout(button);
}
}
return true;
@@ -424,8 +420,14 @@ export class MainView extends React.Component {
</div>;
}
- expandFlyout = action(() => this._flyoutWidth = (this._flyoutWidth || 250));
- toggleFlyout = action(() => this._flyoutWidth < 15 ? this.expandFlyout() : this.closeFlyout());
+ expandFlyout = action((button: Doc) => {
+ this._flyoutWidth = (this._flyoutWidth || 250);
+ this._sidebarContent.proto = button.target as any;
+ button._backgroundColor = "lightgrey";
+ button.color = "black";
+ this._lastButton = button;
+ });
+
closeFlyout = action(() => {
this._lastButton && (this._lastButton.color = "white");
this._lastButton && (this._lastButton._backgroundColor = "");