diff options
author | Tyler Schicke <tyler_schicke@brown.edu> | 2019-07-05 13:22:28 -0400 |
---|---|---|
committer | Tyler Schicke <tyler_schicke@brown.edu> | 2019-07-05 13:22:28 -0400 |
commit | 0023f55627e0144573a03ea87f41395a440bdb75 (patch) | |
tree | 0083ee2aa37e41872cb4880ef968e0dc817d95eb /src/client/views/nodes/DocumentContentsView.tsx | |
parent | f951da80c668f2707311fb6ac87bee57f9856a2d (diff) | |
parent | 336266551d363df8c4958d485170846b478f1787 (diff) |
Merge branch 'master' of github-tsch-brown:browngraphicslab/Dash-Web
Diffstat (limited to 'src/client/views/nodes/DocumentContentsView.tsx')
-rw-r--r-- | src/client/views/nodes/DocumentContentsView.tsx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/views/nodes/DocumentContentsView.tsx b/src/client/views/nodes/DocumentContentsView.tsx index 0da4888a1..51d0c83cd 100644 --- a/src/client/views/nodes/DocumentContentsView.tsx +++ b/src/client/views/nodes/DocumentContentsView.tsx @@ -24,6 +24,7 @@ import { Without, OmitKeys } from "../../../Utils"; import { Cast, StrCast, NumCast } from "../../../new_fields/Types"; import { List } from "../../../new_fields/List"; import { Doc } from "../../../new_fields/Doc"; +import { CollectionViewType } from "../collections/CollectionBaseView"; const JsxParser = require('react-jsx-parser').default; //TODO Why does this need to be imported like this? type BindingProps = Without<FieldViewProps, 'fieldKey'>; @@ -82,7 +83,8 @@ export class DocumentContentsView extends React.Component<DocumentViewProps & { // by checking the layoutKey. This should probably be moved into // a prop so that the overlay can explicitly turn off templates. if ((this.props.layoutKey === "overlayLayout" && StrCast(this.props.Document.layout).indexOf("CollectionView") !== -1) || - (this.props.layoutKey === "layout" && StrCast(this.props.Document.layout).indexOf("CollectionView") === -1)) { + (this.props.layoutKey === "layout" && StrCast(this.props.Document.layout).indexOf("CollectionView") === -1) || + (this.props.layoutKey === "layout" && NumCast(this.props.Document.viewType)) !== CollectionViewType.Freeform) { this.templates.forEach(template => { let self = this; // this scales constants in the markup by the scaling applied to the document, but caps the constants to be smaller @@ -103,6 +105,7 @@ export class DocumentContentsView extends React.Component<DocumentViewProps & { } render() { + console.log(this.props.Document.title); if (this.props.renderDepth > 7) return (null); if (!this.layout && (this.props.layoutKey !== "overlayLayout" || !this.templates.length)) return (null); return <ObserverJsxParser |