aboutsummaryrefslogtreecommitdiff
path: root/src/new_fields/Doc.ts
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2019-09-11 22:52:07 -0400
committerBob Zeleznik <zzzman@gmail.com>2019-09-11 22:52:07 -0400
commit186d7aed7b99b1373e99b51cfe0c88c8167c8290 (patch)
tree6ab42f4272cbd608a1b61051438086e52c6e9d4f /src/new_fields/Doc.ts
parent4869c5a6de14ca04b2159dc3a35aa26653501168 (diff)
fixed some template issues specifically for self-templates.
Diffstat (limited to 'src/new_fields/Doc.ts')
-rw-r--r--src/new_fields/Doc.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/new_fields/Doc.ts b/src/new_fields/Doc.ts
index d4b784cac..e94b9f1eb 100644
--- a/src/new_fields/Doc.ts
+++ b/src/new_fields/Doc.ts
@@ -459,7 +459,7 @@ export namespace Doc {
}
if (expandedTemplateLayout === undefined) {
setTimeout(() => dataDoc[expandedLayoutFieldKey] === undefined &&
- (dataDoc[expandedLayoutFieldKey] = !BoolCast(templateLayoutDoc.suppressTemplateInstance) ? Doc.MakeDelegate(templateLayoutDoc, undefined, "[" + templateLayoutDoc.title + "]") : templateLayoutDoc), 0);
+ (dataDoc[expandedLayoutFieldKey] = Doc.MakeDelegate(templateLayoutDoc, undefined, "[" + templateLayoutDoc.title + "]")), 0);
}
return undefined; // use the templateLayout when it's not a template or the expandedTemplate is pending.
}
@@ -558,7 +558,7 @@ export namespace Doc {
}
}
- export function MakeTemplate(fieldTemplate: Doc, metaKey: string, templateDataDoc: Doc, suppressTemplateFlag?: boolean) {
+ export function MakeTemplate(fieldTemplate: Doc, metaKey: string, templateDataDoc: Doc) {
// move data doc fields to layout doc as needed (nativeWidth/nativeHeight, data, ??)
let backgroundLayout = StrCast(fieldTemplate.backgroundLayout);
let fieldLayoutDoc = fieldTemplate;
@@ -576,7 +576,6 @@ export namespace Doc {
fieldTemplate.templateField = metaKey;
fieldTemplate.title = metaKey;
fieldTemplate.isTemplate = true;
- fieldTemplate.suppressTemplateInstance = suppressTemplateFlag;
fieldTemplate.layout = layoutDelegate !== fieldTemplate ? layoutDelegate : layout;
fieldTemplate.backgroundLayout = backgroundLayout;
/* move certain layout properties from the original data doc to the template layout to avoid