From ee7572ae3d5715ddbce57db3940204a3d0a3d826 Mon Sep 17 00:00:00 2001
From: Bob Zeleznik <zzzman@gmail.com>
Date: Tue, 2 Jul 2019 19:03:01 -0400
Subject: fixed collapsing of tree view items on resize.

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

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

diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx
index ab9fe0118..9dccb883e 100644
--- a/src/client/views/MainView.tsx
+++ b/src/client/views/MainView.tsx
@@ -284,7 +284,7 @@ export class MainView extends React.Component {
         document.removeEventListener("pointerup", this.onPointerUp);
     }
     @computed
-    get mainContent() {
+    get flyout() {
         let addDocTab = (doc: Doc, dataDoc: Doc | undefined, location: string) => {
             if (doc.dockingConfig) {
                 this.openWorkspace(doc);
@@ -292,7 +292,7 @@ export class MainView extends React.Component {
                 CollectionDockingView.Instance.AddRightSplit(doc, dataDoc);
             }
         };
-        let flyout = <DocumentView
+        return <DocumentView
             Document={CurrentUserUtils.UserDocument}
             DataDoc={undefined}
             addDocument={undefined}
@@ -312,6 +312,9 @@ export class MainView extends React.Component {
             zoomToScale={emptyFunction}
             getScale={returnOne}>
         </DocumentView>;
+    }
+    @computed
+    get mainContent() {
         return <div>
             <div className="mainView-libraryHandle"
                 style={{ left: `${this.flyoutWidth - 10}px` }}
@@ -319,7 +322,7 @@ export class MainView extends React.Component {
                 <span title="library View Dragger" style={{ width: "100%", height: "100%", position: "absolute" }} />
             </div>
             <div className="mainView-libraryFlyout" style={{ width: `${this.flyoutWidth}px` }}>
-                {flyout}
+                {this.flyout}
             </div>
             {this.dockingContent}
         </div>;
-- 
cgit v1.2.3-70-g09d2

