diff options
| author | yipstanley <stanley_yip@brown.edu> | 2019-07-12 13:15:48 -0400 |
|---|---|---|
| committer | yipstanley <stanley_yip@brown.edu> | 2019-07-12 13:15:48 -0400 |
| commit | 2dfc3abde7a353005e0f211adcb1ca993ce6cba1 (patch) | |
| tree | c6d453b592efdc19c165153dfd92726fa5464179 /src/client/views/collections/CollectionStackingView.tsx | |
| parent | cae397d6bba9253295d0627c3839ec33e69946c5 (diff) | |
| parent | bde549beec0b9644ff0e39585989b1a6795750eb (diff) | |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web
Diffstat (limited to 'src/client/views/collections/CollectionStackingView.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionStackingView.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/views/collections/CollectionStackingView.tsx b/src/client/views/collections/CollectionStackingView.tsx index 62968821a..c667b3f3c 100644 --- a/src/client/views/collections/CollectionStackingView.tsx +++ b/src/client/views/collections/CollectionStackingView.tsx @@ -12,7 +12,7 @@ import "./CollectionStackingView.scss"; import { CollectionSubView } from "./CollectionSubView"; import { undoBatch } from "../../util/UndoManager"; import { DragManager } from "../../util/DragManager"; -import { DocTypes } from "../../documents/Documents"; +import { DocumentType } from "../../documents/Documents"; import { Transform } from "../../util/Transform"; import { resolve } from "bluebird"; @@ -51,7 +51,7 @@ export class CollectionStackingView extends CollectionSubView(doc => doc) { } overlays = (doc: Doc) => { - return doc.type === DocTypes.IMG ? { title: "title", caption: "caption" } : {}; + return doc.type === DocumentType.IMG ? { title: "title", caption: "caption" } : {}; } getDisplayDoc(layoutDoc: Doc, d: Doc, dxf: () => Transform) { @@ -114,6 +114,7 @@ export class CollectionStackingView extends CollectionSubView(doc => doc) { if (this.singleColumn) { let dxf = () => this.getSingleDocTransform(layoutDoc, i, width()); let rowHgtPcnt = height() / (this.props.Document[HeightSym]() - 2 * this.yMargin) * 100; + this._docXfs.push({ dxf: dxf, width: width, height: height }); return <div className="collectionStackingView-columnDoc" key={d[Id]} style={{ width: width(), marginTop: i === 0 ? 0 : this.gridGap, height: `${rowHgtPcnt}%` }} > {this.getDisplayDoc(layoutDoc, d, dxf)} </div>; |
