aboutsummaryrefslogtreecommitdiff
path: root/src/client/documents/Documents.ts
diff options
context:
space:
mode:
authoryipstanley <stanley_yip@brown.edu>2019-02-13 20:17:21 -0500
committeryipstanley <stanley_yip@brown.edu>2019-02-13 20:17:21 -0500
commitf3544f004a696e4682fbd8d1f18ac69beec59439 (patch)
tree0839c355fe813ba494c6451b9017c5e325e1cfb8 /src/client/documents/Documents.ts
parent430878f6dd8d36b1322e15d0898ada0d44fecacb (diff)
asdfkj
Diffstat (limited to 'src/client/documents/Documents.ts')
-rw-r--r--src/client/documents/Documents.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts
index 460bf9b23..f362af392 100644
--- a/src/client/documents/Documents.ts
+++ b/src/client/documents/Documents.ts
@@ -137,9 +137,9 @@ export namespace Documents {
}
let collectionProto: Document;
- function GetCollectionPrototype(): Document {
+ function GetCollectionPrototype(isMainDoc: boolean): Document {
if (!collectionProto) {
- collectionProto = new Document();
+ collectionProto = new Document(isMainDoc ? "dash" : undefined);
collectionProto.Set(KeyStore.X, new NumberField(0));
collectionProto.Set(KeyStore.Y, new NumberField(0));
collectionProto.Set(KeyStore.Scale, new NumberField(1));
@@ -153,8 +153,8 @@ export namespace Documents {
return collectionProto;
}
- export function CollectionDocument(documents: Array<Document>, options: DocumentOptions = {}): Document {
- let doc = GetCollectionPrototype().MakeDelegate();
+ export function CollectionDocument(documents: Array<Document>, options: DocumentOptions = {}, isMainDoc: boolean = false): Document {
+ let doc = GetCollectionPrototype(isMainDoc).MakeDelegate();
setupOptions(doc, options);
doc.Set(KeyStore.Data, new ListField(documents));
return doc;