From 515707c4561eb526426b8fa07dd50bd499fb91cc Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Tue, 25 Feb 2025 01:03:25 -0500
Subject: 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

---
 src/client/views/MainView.tsx | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

(limited to 'src/client/views/MainView.tsx')

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');
-- 
cgit v1.2.3-70-g09d2

