aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/views/collections/CollectionView.tsx10
-rw-r--r--src/new_fields/Doc.ts1
2 files changed, 6 insertions, 5 deletions
diff --git a/src/client/views/collections/CollectionView.tsx b/src/client/views/collections/CollectionView.tsx
index b6b690e26..7e9d35d3d 100644
--- a/src/client/views/collections/CollectionView.tsx
+++ b/src/client/views/collections/CollectionView.tsx
@@ -16,6 +16,7 @@ import { CollectionSchemaView } from "./CollectionSchemaView";
import { CollectionStackingView } from './CollectionStackingView';
import { CollectionTreeView } from "./CollectionTreeView";
import { StrCast, PromiseValue } from '../../../new_fields/Types';
+import { DocumentType } from '../../documents/Documents';
export const COLLECTION_BORDER_WIDTH = 2;
library.add(faTh);
@@ -63,10 +64,11 @@ export class CollectionView extends React.Component<FieldViewProps> {
let otherdoc = new Doc();
otherdoc.width = this.props.Document[WidthSym]();
otherdoc.height = this.props.Document[HeightSym]();
- Doc.GetProto(otherdoc).title = this.props.Document.title + "(..." + CollectionView._applyCount++ + ")"; // previously "applied"
- Doc.GetProto(otherdoc).layout = Doc.MakeDelegate(this.props.Document);
- Doc.GetProto(otherdoc).miniLayout = StrCast(this.props.Document.miniLayout);
- Doc.GetProto(otherdoc).detailedLayout = Doc.GetProto(otherdoc).layout;
+ otherdoc.title = this.props.Document.title + "(..." + CollectionView._applyCount++ + ")"; // previously "applied"
+ otherdoc.layout = Doc.MakeDelegate(this.props.Document);
+ otherdoc.miniLayout = StrCast(this.props.Document.miniLayout);
+ otherdoc.detailedLayout = otherdoc.layout;
+ otherdoc.type = DocumentType.TEMPLATE;
this.props.addDocTab && this.props.addDocTab(otherdoc, undefined, "onRight");
}), icon: "project-diagram"
});
diff --git a/src/new_fields/Doc.ts b/src/new_fields/Doc.ts
index c6b364d8e..2ad6ae5f0 100644
--- a/src/new_fields/Doc.ts
+++ b/src/new_fields/Doc.ts
@@ -423,7 +423,6 @@ export namespace Doc {
fieldTemplate.nativeHeight = nh;
fieldTemplate.isTemplate = true;
fieldTemplate.showTitle = "title";
- fieldTemplate.type = DocumentType.TEMPLATE;
setTimeout(() => fieldTemplate.proto = proto);
}