aboutsummaryrefslogtreecommitdiff
path: root/src/client/documents/Documents.ts
diff options
context:
space:
mode:
authorandrewdkim <adkim414@gmail.com>2019-08-14 11:55:16 -0400
committerandrewdkim <adkim414@gmail.com>2019-08-14 11:55:16 -0400
commit46f4945d38ca9423f1114fb4c4b4f4a72389a89e (patch)
tree49de0599cc94f504e4bb5e46f889cb01bbc1b641 /src/client/documents/Documents.ts
parentf43509c132b5302b9983667aaf99251051b38b59 (diff)
parent7a71c9005189e111e9c9d197d02cc9a6a1bce389 (diff)
merge from master
Diffstat (limited to 'src/client/documents/Documents.ts')
-rw-r--r--src/client/documents/Documents.ts11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts
index 7dd853156..9c8b6c129 100644
--- a/src/client/documents/Documents.ts
+++ b/src/client/documents/Documents.ts
@@ -17,6 +17,7 @@ export enum DocumentType {
TEMPLATE = "template",
EXTENSION = "extension",
YOUTUBE = "youtube",
+ DRAGBOX = "dragbox",
}
import { HistogramField } from "../northstar/dash-fields/HistogramField";
@@ -60,6 +61,7 @@ import { DocumentManager } from "../util/DocumentManager";
import DirectoryImportBox from "../util/Import & Export/DirectoryImportBox";
import { Scripting, CompileScript } from "../util/Scripting";
import { ButtonBox } from "../views/nodes/ButtonBox";
+import { DragBox } from "../views/nodes/DragBox";
import { SchemaHeaderField, RandomPastel } from "../../new_fields/SchemaHeaderField";
import { ComputedField } from "../../new_fields/ScriptField";
import { ProxyField } from "../../new_fields/Proxy";
@@ -177,6 +179,10 @@ export namespace Docs {
}],
[DocumentType.BUTTON, {
layout: { view: ButtonBox },
+ }],
+ [DocumentType.DRAGBOX, {
+ layout: { view: DragBox },
+ options: { width: 40, height: 40 },
}]
]);
@@ -442,6 +448,11 @@ export namespace Docs {
return InstanceFromProto(Prototypes.get(DocumentType.BUTTON), undefined, { ...(options || {}) });
}
+
+ export function DragboxDocument(options?: DocumentOptions) {
+ return InstanceFromProto(Prototypes.get(DocumentType.DRAGBOX), undefined, { ...(options || {}) });
+ }
+
export function DockDocument(documents: Array<Doc>, config: string, options: DocumentOptions, id?: string) {
return InstanceFromProto(Prototypes.get(DocumentType.COL), new List(documents), { ...options, viewType: CollectionViewType.Docking, dockingConfig: config }, id);
}