aboutsummaryrefslogtreecommitdiff
path: root/src/new_fields/Doc.ts
diff options
context:
space:
mode:
authormonikahedman <monika_hedman@brown.edu>2019-08-23 18:37:07 -0400
committermonikahedman <monika_hedman@brown.edu>2019-08-23 18:37:07 -0400
commit6c1baab02196e78c334db88b15dfcbd9369966f4 (patch)
tree8d6865cea7c43c33347b79a53de55a272ae64be8 /src/new_fields/Doc.ts
parentc752994552be6d8a7e91093bf9d64896fd51138f (diff)
parentdee6904f0fd4d54862bfd1c86611be294517951c (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into monika_linking
Diffstat (limited to 'src/new_fields/Doc.ts')
-rw-r--r--src/new_fields/Doc.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/new_fields/Doc.ts b/src/new_fields/Doc.ts
index c57c4e659..a703f1cef 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) {