From 18ce93d480cea51087672649382f92c5462ae085 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Tue, 15 Feb 2022 12:58:09 -0500
Subject: improved version of incrementall rendering of large collections of
 documents in freeform view.

---
 src/client/views/nodes/CollectionFreeFormDocumentView.tsx | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

(limited to 'src/client/views/nodes/CollectionFreeFormDocumentView.tsx')

diff --git a/src/client/views/nodes/CollectionFreeFormDocumentView.tsx b/src/client/views/nodes/CollectionFreeFormDocumentView.tsx
index d8ba88c02..460982c8a 100644
--- a/src/client/views/nodes/CollectionFreeFormDocumentView.tsx
+++ b/src/client/views/nodes/CollectionFreeFormDocumentView.tsx
@@ -28,6 +28,8 @@ export interface CollectionFreeFormDocumentViewProps extends DocumentViewProps {
     jitterRotation: number;
     dataTransition?: string;
     replica: string;
+    renderCutoff: () => number;
+    renderIndex: number;
     CollectionFreeFormView: CollectionFreeFormView;
 }
 
@@ -176,7 +178,10 @@ export class CollectionFreeFormDocumentView extends DocComponent<CollectionFreeF
                 mixBlendMode,
                 display: this.ZInd === -99 ? "none" : undefined
             }} >
-            <DocumentView {...divProps} ref={action((r: DocumentView | null) => this._contentView = r)} />
+            {this.props.renderCutoff() >= this.props.renderIndex ?
+                <DocumentView {...divProps} ref={action((r: DocumentView | null) => this._contentView = r)} />
+                :
+                <div style={{ position: "absolute", width: this.panelWidth(), height: this.panelHeight(), background: "lightGreen" }}></div>}
         </div>;
     }
 }
-- 
cgit v1.2.3-70-g09d2

