From cccc43c64a749e34a993e32f8616ac7e0532c7d9 Mon Sep 17 00:00:00 2001 From: Bob Zeleznik Date: Fri, 21 Jun 2019 09:18:45 -0400 Subject: more templating fixes. --- src/client/views/collections/CollectionView.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/client/views/collections/CollectionView.tsx') diff --git a/src/client/views/collections/CollectionView.tsx b/src/client/views/collections/CollectionView.tsx index e24466d57..f254e6005 100644 --- a/src/client/views/collections/CollectionView.tsx +++ b/src/client/views/collections/CollectionView.tsx @@ -64,6 +64,7 @@ export class CollectionView extends React.Component { Doc.GetProto(collection).description = "my first templated box"; let template = Doc.MakeAlias(collection); template.layout = FormattedTextBox.LayoutString("description"); + template.isTemplate = true; template.x = 0; template.y = 0; template.width = 100; @@ -76,6 +77,7 @@ export class CollectionView extends React.Component { Doc.GetProto(this.props.Document).summary = "my first templated box"; let template = Doc.MakeAlias(this.props.Document); template.layout = FormattedTextBox.LayoutString("summary"); + template.isTemplate = true; template.x = 0; template.y = 0; template.width = 100; @@ -88,7 +90,7 @@ export class CollectionView extends React.Component { let otherdoc = Docs.TextDocument({ width: 100, height: 50, title: "applied template" }); Doc.GetProto(otherdoc).description = "THIS DESCRIPTION IS REALLY IMPORTANT!"; Doc.GetProto(otherdoc).summary = "THIS SUMMARY IS MEANINGFUL!"; - Doc.GetProto(otherdoc).layout = this.props.Document; + Doc.GetProto(otherdoc).layout = Doc.MakeDelegate(this.props.Document); this.props.addDocTab && this.props.addDocTab(otherdoc, "onRight"); }), icon: "project-diagram" }); -- cgit v1.2.3-70-g09d2