aboutsummaryrefslogtreecommitdiff
path: root/src/client/documents/Documents.ts
diff options
context:
space:
mode:
authorSam Wilkins <samwilkins333@gmail.com>2019-12-17 16:38:19 -0800
committerSam Wilkins <samwilkins333@gmail.com>2019-12-17 16:38:19 -0800
commit10843071eacf94b237d131a50df9c58352441814 (patch)
tree854ed4e91131d5f11c4526c0cd24056adf1de2e3 /src/client/documents/Documents.ts
parente553c4ac4785ee1d2c57ed5d5303d6dff26929f9 (diff)
parent96ada41d4c3c411be63bd656da65bba7894a4224 (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web
Diffstat (limited to 'src/client/documents/Documents.ts')
-rw-r--r--src/client/documents/Documents.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts
index 4ba45ac30..50c51ace1 100644
--- a/src/client/documents/Documents.ts
+++ b/src/client/documents/Documents.ts
@@ -48,6 +48,7 @@ import { PresElementBox } from "../views/presentationview/PresElementBox";
import { QueryBox } from "../views/nodes/QueryBox";
import { ColorBox } from "../views/nodes/ColorBox";
import { DocuLinkBox } from "../views/nodes/DocuLinkBox";
+import { DocumentBox } from "../views/nodes/DocumentBox";
import { InkingStroke } from "../views/InkingStroke";
import { InkField } from "../../new_fields/InkField";
const requestImageSize = require('../util/request-image-size');
@@ -171,6 +172,10 @@ export namespace Docs {
layout: { view: KeyValueBox, dataField: data },
options: { height: 150 }
}],
+ [DocumentType.DOCUMENT, {
+ layout: { view: DocumentBox, dataField: data },
+ options: { height: 250 }
+ }],
[DocumentType.VID, {
layout: { view: VideoBox, dataField: data },
options: { currentTimecode: 0 },
@@ -482,6 +487,10 @@ export namespace Docs {
return InstanceFromProto(Prototypes.get(DocumentType.KVP), document, { title: document.title + ".kvp", ...options });
}
+ export function DocumentDocument(document?: Doc, options: DocumentOptions = {}) {
+ return InstanceFromProto(Prototypes.get(DocumentType.DOCUMENT), document, { title: document ? document.title + "" : "container", ...options });
+ }
+
export function FreeformDocument(documents: Array<Doc>, options: DocumentOptions, id?: string) {
return InstanceFromProto(Prototypes.get(DocumentType.COL), new List(documents), { chromeStatus: "collapsed", schemaColumns: new List([new SchemaHeaderField("title", "#f1efeb")]), ...options, viewType: CollectionViewType.Freeform }, id);
}