From 8a293ac029c4ab9973067fe40c3aa9b2f118d27d Mon Sep 17 00:00:00 2001 From: Tyler Schicke Date: Mon, 18 Feb 2019 02:35:01 -0500 Subject: Delayed parsing of background layout in DocumentView --- src/client/views/collections/CollectionFreeFormView.tsx | 2 +- src/client/views/collections/CollectionViewBase.tsx | 2 +- src/client/views/nodes/DocumentView.tsx | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') 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 ( boolean; isTopMost: boolean; select: (ctrlPressed: boolean) => void; - BackgroundView: Opt; + BackgroundView?: () => JSX.Element; ParentScaling: number; } diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index b25a29ad0..5f6e8dad4 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -230,13 +230,13 @@ export class DocumentView extends React.Component { } let backgroundLayout = this.backgroundLayout; if (backgroundLayout) { - let backgroundView = ( { console.log(test) }} - />; + />); bindings.BackgroundView = backgroundView; } -- cgit v1.2.3-70-g09d2