diff options
author | bob <bcz@cs.brown.edu> | 2019-03-15 08:27:20 -0400 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2019-03-15 08:27:20 -0400 |
commit | bd713a6a7a9c5ded3c4fcdf6afb8e7b81d537c56 (patch) | |
tree | 86e40e9fd971b9b9265359a876df77a0bd7ff51d /src/client/documents/Documents.ts | |
parent | 09e895c0aceaa4227cfbbe3a70f07f1ded486a1f (diff) | |
parent | f089e10dfd42edc395729a6b71e42385745f364e (diff) |
Merge branch 'master' into ui_improvements
Diffstat (limited to 'src/client/documents/Documents.ts')
-rw-r--r-- | src/client/documents/Documents.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts index 8fe20994e..05bc743be 100644 --- a/src/client/documents/Documents.ts +++ b/src/client/documents/Documents.ts @@ -24,10 +24,12 @@ import { PDFBox } from "../views/nodes/PDFBox"; import { CollectionPDFView } from "../views/collections/CollectionPDFView"; import { RichTextField } from "../../fields/RichTextField"; import { CollectionVideoView } from "../views/collections/CollectionVideoView"; +import { StrokeData, InkField } from "../../fields/InkField"; export interface DocumentOptions { x?: number; y?: number; + ink?: Map<string, StrokeData>; width?: number; height?: number; nativeWidth?: number; @@ -40,6 +42,7 @@ export interface DocumentOptions { layout?: string; layoutKeys?: Key[]; viewType?: number; + backgroundColor?: string; } export namespace Documents { @@ -83,8 +86,10 @@ export namespace Documents { if (options.page !== undefined) { doc.SetNumber(KeyStore.Page, options.page); } if (options.scale !== undefined) { doc.SetNumber(KeyStore.Scale, options.scale); } if (options.viewType !== undefined) { doc.SetNumber(KeyStore.ViewType, options.viewType); } + if (options.backgroundColor !== undefined) { doc.SetText(KeyStore.BackgroundColor, options.backgroundColor); } if (options.layout !== undefined) { doc.SetText(KeyStore.Layout, options.layout); } if (options.layoutKeys !== undefined) { doc.Set(KeyStore.LayoutKeys, new ListField(options.layoutKeys)); } + if (options.ink !== undefined) { doc.Set(KeyStore.Ink, new InkField(options.ink)); } return doc; } function setupPrototypeOptions(protoId: string, title: string, layout: string, options: DocumentOptions): Document { |