aboutsummaryrefslogtreecommitdiff
path: root/src/client/documents
diff options
context:
space:
mode:
authorSam Wilkins <samwilkins333@gmail.com>2020-05-03 15:05:07 -0700
committerSam Wilkins <samwilkins333@gmail.com>2020-05-03 15:05:07 -0700
commitdd5641a55cbfe4f3acc5ae652948be28a08469d7 (patch)
tree06b4f45115b87e2c8eb4900b816c9197494b58d0 /src/client/documents
parentb8a62e6404a695e57ab1305fd13be23e8d935360 (diff)
parenta087ea8dc3de156e23cb99f91bc1ea79365c7001 (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web
Diffstat (limited to 'src/client/documents')
-rw-r--r--src/client/documents/Documents.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts
index 672f94f75..8ea8ded0f 100644
--- a/src/client/documents/Documents.ts
+++ b/src/client/documents/Documents.ts
@@ -746,6 +746,10 @@ export namespace Docs {
};
return DockDocument(configs.map(c => c.doc), JSON.stringify(layoutConfig), options, id);
}
+
+ export function DelegateDocument(proto: Doc, options: DocumentOptions = {}) {
+ return InstanceFromProto(proto, undefined, options);
+ }
}
export namespace Get {
@@ -1052,4 +1056,5 @@ export namespace DocUtils {
}
Scripting.addGlobal("Docs", Docs);
+Scripting.addGlobal(function makeDelegate(proto: any) { const d = Docs.Create.DelegateDocument(proto, { title: "child of " + proto.title }); return d; });