diff options
| author | Tyler Schicke <tyler_schicke@brown.edu> | 2019-02-18 02:35:01 -0500 |
|---|---|---|
| committer | Tyler Schicke <tyler_schicke@brown.edu> | 2019-02-18 02:35:01 -0500 |
| commit | 8a293ac029c4ab9973067fe40c3aa9b2f118d27d (patch) | |
| tree | 2e20eb7cb7ae80b0a36fd46418bc040ad0efe438 /src/client/views/collections | |
| parent | 4ae8e7791d217a04a913caa75c8e276a50608865 (diff) | |
Delayed parsing of background layout in DocumentView
Diffstat (limited to 'src/client/views/collections')
| -rw-r--r-- | src/client/views/collections/CollectionFreeFormView.tsx | 2 | ||||
| -rw-r--r-- | src/client/views/collections/CollectionViewBase.tsx | 2 |
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; } |
