diff options
Diffstat (limited to 'src/client/documents')
| -rw-r--r-- | src/client/documents/Documents.ts | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts index 9c8b6c129..8444f0d72 100644 --- a/src/client/documents/Documents.ts +++ b/src/client/documents/Documents.ts @@ -63,11 +63,33 @@ 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"; +import { PresBox } from "../views/nodes/PresBox"; +//import { PresBox } from "../views/nodes/PresBox"; +//import { PresField } from "../../new_fields/PresField"; var requestImageSize = require('../util/request-image-size'); var path = require('path'); +export enum DocumentType { + NONE = "none", + TEXT = "text", + HIST = "histogram", + IMG = "image", + WEB = "web", + COL = "collection", + KVP = "kvp", + VID = "video", + AUDIO = "audio", + PDF = "pdf", + ICON = "icon", + IMPORT = "import", + LINK = "link", + LINKDOC = "linkdoc", + BUTTON = "button", + TEMPLATE = "template", + EXTENSION = "extension", + PRES = "presentation" +} + export interface DocumentOptions { x?: number; y?: number; @@ -180,6 +202,10 @@ export namespace Docs { [DocumentType.BUTTON, { layout: { view: ButtonBox }, }], + [DocumentType.PRES, { + layout: { view: PresBox }, + options: {} + }], [DocumentType.DRAGBOX, { layout: { view: DragBox }, options: { width: 40, height: 40 }, @@ -352,6 +378,9 @@ export namespace Docs { .catch((err: any) => console.log(err)); return inst; } + export function PresDocument(initial: List<Doc> = new List(), options: DocumentOptions = {}) { + return InstanceFromProto(Prototypes.get(DocumentType.PRES), initial, options); + } export function VideoDocument(url: string, options: DocumentOptions = {}) { return InstanceFromProto(Prototypes.get(DocumentType.VID), new VideoField(new URL(url)), options); |
