aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections
diff options
context:
space:
mode:
authorTyler Schicke <tyler_schicke@brown.edu>2019-02-18 02:35:01 -0500
committerTyler Schicke <tyler_schicke@brown.edu>2019-02-18 02:35:01 -0500
commit8a293ac029c4ab9973067fe40c3aa9b2f118d27d (patch)
tree2e20eb7cb7ae80b0a36fd46418bc040ad0efe438 /src/client/views/collections
parent4ae8e7791d217a04a913caa75c8e276a50608865 (diff)
Delayed parsing of background layout in DocumentView
Diffstat (limited to 'src/client/views/collections')
-rw-r--r--src/client/views/collections/CollectionFreeFormView.tsx2
-rw-r--r--src/client/views/collections/CollectionViewBase.tsx2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/collections/CollectionFreeFormView.tsx b/src/client/views/collections/CollectionFreeFormView.tsx
index f0cf7f0ca..eca8a0adf 100644
--- a/src/client/views/collections/CollectionFreeFormView.tsx
+++ b/src/client/views/collections/CollectionFreeFormView.tsx
@@ -241,7 +241,7 @@ export class CollectionFreeFormView extends CollectionViewBase {
style={{ width: "100%", transformOrigin: "left top", transform: ` translate(${panx}px, ${pany}px) scale(${this.zoomScaling}, ${this.zoomScaling})` }}
ref={this._canvasRef}>
- {this.props.BackgroundView}
+ {this.props.BackgroundView ? this.props.BackgroundView() : null}
{value.map(doc => {
return (<CollectionFreeFormDocumentView key={doc.Id} Document={doc}
AddDocument={this.addDocument}
diff --git a/src/client/views/collections/CollectionViewBase.tsx b/src/client/views/collections/CollectionViewBase.tsx
index a8dceff0a..4cbafe950 100644
--- a/src/client/views/collections/CollectionViewBase.tsx
+++ b/src/client/views/collections/CollectionViewBase.tsx
@@ -21,7 +21,7 @@ export interface CollectionViewProps {
isSelected: () => boolean;
isTopMost: boolean;
select: (ctrlPressed: boolean) => void;
- BackgroundView: Opt<DocumentView>;
+ BackgroundView?: () => JSX.Element;
ParentScaling: number;
}