From 26af9562cc515627be4be8759b70ebfbab8bb83c Mon Sep 17 00:00:00 2001
From: bob <bcz@cs.brown.edu>
Date: Tue, 5 Feb 2019 17:41:12 -0500
Subject: first changes

---
 src/views/collections/CollectionDockingView.tsx | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

(limited to 'src/views/collections/CollectionDockingView.tsx')

diff --git a/src/views/collections/CollectionDockingView.tsx b/src/views/collections/CollectionDockingView.tsx
index 92b5e563c..51e2cfbbc 100644
--- a/src/views/collections/CollectionDockingView.tsx
+++ b/src/views/collections/CollectionDockingView.tsx
@@ -15,6 +15,7 @@ import * as GoldenLayout from "golden-layout";
 import * as ReactDOM from 'react-dom';
 import { DragManager } from "../../util/DragManager";
 import { CollectionViewBase, CollectionViewProps, COLLECTION_BORDER_WIDTH } from "./CollectionViewBase";
+import { WAITING } from "../../fields/Field";
 
 @observer
 export class CollectionDockingView extends CollectionViewBase {
@@ -69,6 +70,8 @@ export class CollectionDockingView extends CollectionViewBase {
 
     @action
     onResize = (event: any) => {
+        if (this.props.ContainingDocumentView == WAITING)
+            return;
         var cur = this.props.ContainingDocumentView!.MainContent.current;
 
         // bcz: since GoldenLayout isn't a React component itself, we need to notify it to resize when its document container's size has changed
@@ -217,7 +220,7 @@ export class CollectionDockingView extends CollectionViewBase {
                 CollectionDockingView.myLayout._maximizedStack = stack;
                 CollectionDockingView.myLayout._maxstack = stack.header.controlsContainer.find('.lm_maximise');
             }
-            stack.header.controlsContainer.find('.lm_popout').hide();
+            //stack.header.controlsContainer.find('.lm_popout').hide();
             stack.header.controlsContainer.find('.lm_close') //get the close icon
                 .off('click') //unbind the current click handler
                 .click(function () {
@@ -252,6 +255,8 @@ export class CollectionDockingView extends CollectionViewBase {
 
 
     render() {
+        if (this.props.ContainingDocumentView == WAITING)
+            return;
         const { CollectionFieldKey: fieldKey, DocumentForCollection: Document } = this.props;
         const value: Document[] = Document.GetFieldValue(fieldKey, ListField, []);
         // bcz: not sure why, but I need these to force the flexlayout to update when the collection size changes.
-- 
cgit v1.2.3-70-g09d2

