diff options
author | Bob Zeleznik <zzzman@gmail.com> | 2020-03-28 18:42:19 -0400 |
---|---|---|
committer | Bob Zeleznik <zzzman@gmail.com> | 2020-03-28 18:42:19 -0400 |
commit | 35e84314bc054d81c44ffababd376a133532c8bc (patch) | |
tree | 0b472bac8fbfd18a79018ed955c12feccbc6ca5e /src/new_fields/Doc.ts | |
parent | 7670987e5d957ff0cae12acd921275faae4041b1 (diff) |
more improvements for parameterized templates
Diffstat (limited to 'src/new_fields/Doc.ts')
-rw-r--r-- | src/new_fields/Doc.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/new_fields/Doc.ts b/src/new_fields/Doc.ts index e84ddc684..219877f74 100644 --- a/src/new_fields/Doc.ts +++ b/src/new_fields/Doc.ts @@ -487,7 +487,7 @@ export namespace Doc { setTimeout(action(() => { if (!targetDoc[expandedLayoutFieldKey]) { const newLayoutDoc = Doc.MakeDelegate(templateLayoutDoc, undefined, "[" + templateLayoutDoc.title + "]"); - newLayoutDoc["@params"] = params; + newLayoutDoc["params"] = params; newLayoutDoc.expandedTemplate = targetDoc; // the template's parameters are stored in params which are derefenced to find // the actual field key where the template data is stored. Currently this is only used in RichTextSchema's docView @@ -512,7 +512,7 @@ export namespace Doc { } const existingResolvedDataDoc = childDoc[DataSym] !== Doc.GetProto(childDoc)[DataSym] && childDoc[DataSym]; const resolvedDataDoc = existingResolvedDataDoc || (Doc.AreProtosEqual(containerDataDoc, containerDoc) || !containerDataDoc || (!childDoc.isTemplateDoc && !childDoc.isTemplateForField) ? undefined : containerDataDoc); - return { layout: Doc.expandTemplateLayout(childDoc, resolvedDataDoc, "(" + StrCast(containerDoc["@params"]) + ")"), data: resolvedDataDoc }; + return { layout: Doc.expandTemplateLayout(childDoc, resolvedDataDoc, "(" + StrCast(containerDoc["params"]) + ")"), data: resolvedDataDoc }; } export function Overwrite(doc: Doc, overwrite: Doc, copyProto: boolean = false): Doc { |