aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2019-09-14 11:43:34 -0400
committerbob <bcz@cs.brown.edu>2019-09-14 11:43:34 -0400
commit445b77d13e382542b262cf12e647ed20160dfeaf (patch)
treee79fe03f41b97c5f80e7f603d20aa66c7e49a008
parente125267541968eff8b2bd463b23daf2f79a841b9 (diff)
fixed autoHeight on custom view
-rw-r--r--src/client/views/nodes/DocumentView.tsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx
index a302a7a07..f7e4b3d21 100644
--- a/src/client/views/nodes/DocumentView.tsx
+++ b/src/client/views/nodes/DocumentView.tsx
@@ -494,13 +494,14 @@ export class DocumentView extends DocComponent<DocumentViewProps, Document>(Docu
this.props.Document.customNativeHeight = undefined;
this.props.Document.customIgnoreAspect = undefined;
} else {
- let options = { title: "data", width: NumCast(this.props.Document.width), height: NumCast(this.props.Document.height) + 25, x: -NumCast(this.props.Document.width) / 2, y: -NumCast(this.props.Document.height) / 2, };
+ let options = { title: "data", width: NumCast(this.props.Document.width), x: -NumCast(this.props.Document.width) / 2, y: -NumCast(this.props.Document.height) / 2, };
let fieldTemplate = this.props.Document.type === DocumentType.TEXT ? Docs.Create.TextDocument(options) :
this.props.Document.type === DocumentType.VID ? Docs.Create.VideoDocument("http://www.cs.brown.edu", options) :
Docs.Create.ImageDocument("http://www.cs.brown.edu", options);
fieldTemplate.backgroundColor = StrCast(this.props.Document.backgroundColor);
fieldTemplate.heading = 1;
+ fieldTemplate.autoHeight = true;
let docTemplate = Docs.Create.FreeformDocument([fieldTemplate], { title: StrCast(this.Document.title) + "layout", width: NumCast(this.props.Document.width) + 20, height: Math.max(100, NumCast(this.props.Document.height) + 45) });
let proto = Doc.GetProto(docTemplate);