aboutsummaryrefslogtreecommitdiff
path: root/src/new_fields/Doc.ts
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2019-10-20 23:15:13 -0400
committerBob Zeleznik <zzzman@gmail.com>2019-10-20 23:15:13 -0400
commit1a0eef7c2590a10ca5407c8ade34f10c75308f80 (patch)
tree3e4e5ef98a5ddded413b8820cd5131520593a96b /src/new_fields/Doc.ts
parentf8da2a897de4d737ac3ea697b58d06bba5ce9f66 (diff)
more tree view fixes for templates
Diffstat (limited to 'src/new_fields/Doc.ts')
-rw-r--r--src/new_fields/Doc.ts13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/new_fields/Doc.ts b/src/new_fields/Doc.ts
index 9e879b739..71b64d7c3 100644
--- a/src/new_fields/Doc.ts
+++ b/src/new_fields/Doc.ts
@@ -378,8 +378,9 @@ export namespace Doc {
else list.splice(before ? ind : ind + 1, 0, doc);
}
}
+ return true;
}
- return true;
+ return false;
}
//
@@ -473,15 +474,8 @@ export namespace Doc {
// ... which means we change the layout to be an expanded view of the template layout.
// This allows the view override the template's properties and be referenceable as its own document.
- let expandedTemplateLayout = dataDoc[templateLayoutDoc[Id]];
- if (expandedTemplateLayout instanceof Doc) {
- return expandedTemplateLayout;
- }
- if (expandedTemplateLayout instanceof Promise) {
- return undefined;
- }
let expandedLayoutFieldKey = "Layout[" + templateLayoutDoc[Id] + "]";
- expandedTemplateLayout = dataDoc[expandedLayoutFieldKey];
+ let expandedTemplateLayout = dataDoc[expandedLayoutFieldKey];
if (expandedTemplateLayout instanceof Doc) {
return expandedTemplateLayout;
}
@@ -613,6 +607,7 @@ export namespace Doc {
fieldTemplate.singleColumn = BoolCast(fieldTemplate.singleColumn);
fieldTemplate.nativeWidth = Cast(fieldTemplate.nativeWidth, "number");
fieldTemplate.nativeHeight = Cast(fieldTemplate.nativeHeight, "number");
+ fieldTemplate.type = fieldTemplate.type;
fieldTemplate.panX = 0;
fieldTemplate.panY = 0;
fieldTemplate.scale = 1;