diff options
| author | Sam Wilkins <samwilkins333@gmail.com> | 2019-07-11 18:14:36 -0400 |
|---|---|---|
| committer | Sam Wilkins <samwilkins333@gmail.com> | 2019-07-11 18:14:36 -0400 |
| commit | 1d93275d4202e1243c6c9349114b18c76ed45bbb (patch) | |
| tree | ea17225c58def44a7f83d2234bf8dae73538b398 /src/client/views/collections/CollectionStackingView.tsx | |
| parent | 8bd402c9ac403fdaed9b532d02094c08f9622ab3 (diff) | |
| parent | aeb0521e8ad8f1efc8c3a39af9eb5443c5368453 (diff) | |
merged with master
Diffstat (limited to 'src/client/views/collections/CollectionStackingView.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionStackingView.tsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/views/collections/CollectionStackingView.tsx b/src/client/views/collections/CollectionStackingView.tsx index d26bf5118..5b4ccf662 100644 --- a/src/client/views/collections/CollectionStackingView.tsx +++ b/src/client/views/collections/CollectionStackingView.tsx @@ -14,6 +14,7 @@ import { undoBatch } from "../../util/UndoManager"; import { DragManager } from "../../util/DragManager"; import { DocumentType } from "../../documents/Documents"; import { Transform } from "../../util/Transform"; +import { resolve } from "bluebird"; @observer export class CollectionStackingView extends CollectionSubView(doc => doc) { @@ -54,13 +55,14 @@ export class CollectionStackingView extends CollectionSubView(doc => doc) { } getDisplayDoc(layoutDoc: Doc, d: Doc, dxf: () => Transform) { + let resolvedDataDoc = !this.props.Document.isTemplate && this.props.DataDoc !== this.props.Document ? this.props.DataDoc : undefined; let dataDoc = d !== this.props.DataDoc ? this.props.DataDoc : undefined; let width = () => d.nativeWidth ? Math.min(layoutDoc[WidthSym](), this.columnWidth) : this.columnWidth; let height = () => this.getDocHeight(layoutDoc); let finalDxf = () => dxf().scale(this.columnWidth / layoutDoc[WidthSym]()); return <CollectionSchemaPreview Document={layoutDoc} - DataDocument={dataDoc} + DataDocument={resolvedDataDoc} showOverlays={this.overlays} renderDepth={this.props.renderDepth} width={width} |
