From b421b50ccc5fd481b40a42945088bb51156fe499 Mon Sep 17 00:00:00 2001 From: bob Date: Fri, 23 Aug 2019 14:14:12 -0400 Subject: from last --- src/new_fields/Doc.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/new_fields/Doc.ts') diff --git a/src/new_fields/Doc.ts b/src/new_fields/Doc.ts index 4833ad259..1d529ac84 100644 --- a/src/new_fields/Doc.ts +++ b/src/new_fields/Doc.ts @@ -530,6 +530,7 @@ export namespace Doc { target.nativeWidth = undefined; target.nativeHeight = undefined; target.onClick = undefined; + target.type = undefined; return; } let temp = Doc.MakeDelegate(templateDoc); @@ -540,7 +541,7 @@ export namespace Doc { target.width = templateDoc.width; target.height = templateDoc.height; target.onClick = templateDoc.onClick instanceof ObjectField && templateDoc.onClick[Copy](); - Doc.GetProto(target).type = DocumentType.TEMPLATE; + target.type = DocumentType.TEMPLATE; if (targetData && targetData.layout === target) { targetData.layout = temp; targetData.miniLayout = StrCast(templateDoc.miniLayout); -- cgit v1.2.3-70-g09d2 From dee6904f0fd4d54862bfd1c86611be294517951c Mon Sep 17 00:00:00 2001 From: bob Date: Fri, 23 Aug 2019 18:03:47 -0400 Subject: fixed toggleDetail layout. --- src/new_fields/Doc.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/new_fields/Doc.ts') diff --git a/src/new_fields/Doc.ts b/src/new_fields/Doc.ts index 1d529ac84..6f1ef38d1 100644 --- a/src/new_fields/Doc.ts +++ b/src/new_fields/Doc.ts @@ -589,7 +589,8 @@ export namespace Doc { let miniLayout = await PromiseValue(d.miniLayout); let detailLayout = await PromiseValue(d.detailedLayout); d.layout !== miniLayout ? miniLayout && (d.layout = d.miniLayout) : detailLayout && (d.layout = detailLayout); - if (d.layout === detailLayout) Doc.GetProto(d).nativeWidth = Doc.GetProto(d).nativeHeight = undefined; + if (d.layout === detailLayout) d.nativeWidth = d.nativeHeight = 0; + if (StrCast(d.layout) !== "") d.nativeWidth = d.nativeHeight = undefined; }); } export function UseDetailLayout(d: Doc) { -- cgit v1.2.3-70-g09d2