aboutsummaryrefslogtreecommitdiff
path: root/src/new_fields/Doc.ts
diff options
context:
space:
mode:
authorSam Wilkins <samwilkins333@gmail.com>2019-08-23 18:41:09 -0400
committerSam Wilkins <samwilkins333@gmail.com>2019-08-23 18:41:09 -0400
commitf634a7589de98645a2e36c7796e240ca9432aa19 (patch)
tree23cfd96cd9d3f65c031f196a91a19f4cd7d15187 /src/new_fields/Doc.ts
parent91336f66d30c6a8830d9b69d7263ac72ecca3141 (diff)
parentdee6904f0fd4d54862bfd1c86611be294517951c (diff)
resolved autoheight conflict
Diffstat (limited to 'src/new_fields/Doc.ts')
-rw-r--r--src/new_fields/Doc.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/new_fields/Doc.ts b/src/new_fields/Doc.ts
index 4833ad259..6f1ef38d1 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);
@@ -588,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) {