aboutsummaryrefslogtreecommitdiff
path: root/src/client/documents/Documents.ts
diff options
context:
space:
mode:
authorAndy Rickert <andrew_rickert@brown.edu>2020-08-10 21:05:48 -0400
committerAndy Rickert <andrew_rickert@brown.edu>2020-08-10 21:05:48 -0400
commit105650105d3d41068d0e297c6e0284c9489d3574 (patch)
treeebd24c3bdc9cd3fb854354dd6aa60f596d7aa75b /src/client/documents/Documents.ts
parenta1147c3c3e6ef3d16f850ef61f1c88099e3ab686 (diff)
parent4f1e459051b069dd1500df4c850deb3e67c01e16 (diff)
merge
Diffstat (limited to 'src/client/documents/Documents.ts')
-rw-r--r--src/client/documents/Documents.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts
index 812a55170..6a9701cfa 100644
--- a/src/client/documents/Documents.ts
+++ b/src/client/documents/Documents.ts
@@ -53,6 +53,7 @@ import { Upload } from "../../server/SharedMediaTypes";
const path = require('path');
export interface DocumentOptions {
+ system?: boolean;
_autoHeight?: boolean;
_panX?: number;
_panY?: number;
@@ -530,7 +531,7 @@ export namespace Docs {
Scripting.addGlobal(Buxton);
- const delegateKeys = ["x", "y", "layoutKey", "dropAction", "lockedPosiiton", "childDropAction", "isLinkButton", "isBackground", "removeDropProperties", "treeViewOpen"];
+ const delegateKeys = ["x", "y", "system", "layoutKey", "dropAction", "lockedPosiiton", "childDropAction", "isLinkButton", "isBackground", "removeDropProperties", "treeViewOpen"];
/**
* This function receives the relevant document prototype and uses
@@ -553,6 +554,8 @@ export namespace Docs {
export function InstanceFromProto(proto: Doc, data: Field | undefined, options: DocumentOptions, delegId?: string, fieldKey: string = "data") {
const { omit: protoProps, extract: delegateProps } = OmitKeys(options, delegateKeys, "^_");
+ protoProps.system = delegateProps.system;
+
if (!("author" in protoProps)) {
protoProps.author = Doc.CurrentUserEmail;
}