aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/MainView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2025-02-25 01:03:25 -0500
committerbobzel <zzzman@gmail.com>2025-02-25 01:03:25 -0500
commit515707c4561eb526426b8fa07dd50bd499fb91cc (patch)
treef4cbc69387da19add6dbc88acecbcdbdca575039 /src/client/views/MainView.tsx
parent30b07ed24fbe5e6d49741bc63031807408cd4a0c (diff)
added a hideUI option to hide buttons. fixed a mess of runtime warnings mostly related to how scss files can be included in each other
Diffstat (limited to 'src/client/views/MainView.tsx')
-rw-r--r--src/client/views/MainView.tsx8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx
index 195b1c572..8b0354471 100644
--- a/src/client/views/MainView.tsx
+++ b/src/client/views/MainView.tsx
@@ -99,7 +99,7 @@ export class MainView extends ObservableReactComponent<object> {
@observable private _sidebarContent: Doc = Doc.MyLeftSidebarPanel;
@observable private _leftMenuFlyoutWidth: number = 0;
@computed get _hideUI() {
- return this.mainDoc && this.mainDoc._type_collection !== CollectionViewType.Docking;
+ return SnappingManager.HideUI || (this.mainDoc && this.mainDoc._type_collection !== CollectionViewType.Docking);
}
@computed private get dashboardTabHeight() {
@@ -712,7 +712,7 @@ export class MainView extends ObservableReactComponent<object> {
childFiltersByRanges={returnEmptyFilter}
searchFilterDocs={returnEmptyDoclist}
suppressSetHeight
- renderDepth={this._hideUI ? 0 : -1}
+ renderDepth={-1}
/>
</>
);
@@ -1168,6 +1168,10 @@ ScriptingGlobals.add(function selectMainMenu(doc: Doc) {
MainView.Instance.selectMenu(doc);
});
// eslint-disable-next-line prefer-arrow-callback
+ScriptingGlobals.add(function hideUI() {
+ SnappingManager.SetHideUI(!SnappingManager.HideUI);
+});
+// eslint-disable-next-line prefer-arrow-callback
ScriptingGlobals.add(function createNewPresentation() {
return MainView.Instance.createNewPresentation();
}, 'creates a new presentation when called');