aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/collections')
-rw-r--r--src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
index aeda71d01..2df053c50 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
@@ -1300,6 +1300,7 @@ export class CollectionFreeFormView extends CollectionSubView<PanZoomDocument, P
return { newPool, computedElementData: this.doFreeformLayout(newPool) };
}
+ @observable numLoaded = 0;
get doLayoutComputation() {
const { newPool, computedElementData } = this.doInternalLayoutComputation;
const array = Array.from(newPool.entries());
@@ -1558,8 +1559,13 @@ export class CollectionFreeFormView extends CollectionSubView<PanZoomDocument, P
}
children = () => {
+ this.numLoaded < this.views.length && setTimeout(action(() => this.numLoaded += 10), 500);
const children = typeof this.props.children === "function" ? (this.props.children as any)() as JSX.Element[] : [];
- return [...children, ...this.views, <CollectionFreeFormRemoteCursors {...this.props} key="remoteCursors" />];
+ return [
+ ...children,
+ ...this.views.slice(0, Math.min(this.views.length, this.numLoaded + 10)),
+ <CollectionFreeFormRemoteCursors {...this.props} key="remoteCursors" />
+ ];
}
chooseGridSpace = (gridSpace: number): number => {