aboutsummaryrefslogtreecommitdiff
path: root/src/client/documents/Documents.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-03-14 20:31:06 -0400
committerbobzel <zzzman@gmail.com>2023-03-14 20:31:06 -0400
commit20c0190e820f2bd343693368b7ef55a91f19c880 (patch)
treed6869e114079994f6e3a80702825bfa945077b9e /src/client/documents/Documents.ts
parent8fe91ed2bbb8141657830e238043af37e94a91e4 (diff)
simplified Deserialize code. streamlined currentUserUtils to need fewer compiled functions by parameterizing more functions. .
Diffstat (limited to 'src/client/documents/Documents.ts')
-rw-r--r--src/client/documents/Documents.ts13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts
index 251e432ef..457811e26 100644
--- a/src/client/documents/Documents.ts
+++ b/src/client/documents/Documents.ts
@@ -200,6 +200,8 @@ export class DocumentOptions {
'icon-nativeWidth'?: NUMt = new NumInfo('native width of icon view');
'icon-nativeHeight'?: NUMt = new NumInfo('native height of icon view');
'dragFactory-count'?: NUMt = new NumInfo('number of items created from a drag button (used for setting title with incrementing index)');
+ openFactoryLocation?: string; // an OpenWhere value to place the factory created document
+ openFactoryAsDelegate?: boolean; //
lat?: number;
lng?: number;
infoWindowOpen?: boolean;
@@ -220,6 +222,8 @@ export class DocumentOptions {
autoPlayAnchors?: boolean; // whether to play audio/video when an anchor is clicked in a stackedTimeline.
dontPlayLinkOnSelect?: boolean; // whether an audio/video should start playing when a link is followed to it.
toolTip?: string; // tooltip to display on hover
+ toolType?: string; // type of pen tool
+ expertMode?: boolean; // something available only in expert (not novice) mode
contextMenuFilters?: List<ScriptField>;
contextMenuScripts?: List<ScriptField>;
contextMenuLabels?: List<string>;
@@ -1353,6 +1357,8 @@ export namespace DocUtils {
const script = scripts[key];
if (ScriptCast(doc[key])?.script.originalScript !== scripts[key] && script) {
doc[key] = ScriptField.MakeScript(script, {
+ self: Doc.name,
+ this: Doc.name,
dragData: DragManager.DocumentDragData.name,
value: 'any',
_readOnly_: 'boolean',
@@ -1862,11 +1868,8 @@ export namespace DocUtils {
}
ScriptingGlobals.add('Docs', Docs);
-ScriptingGlobals.add(function copyDragFactory(dragFactory: Doc) {
- return DocUtils.copyDragFactory(dragFactory);
-});
-ScriptingGlobals.add(function delegateDragFactory(dragFactory: Doc) {
- return DocUtils.delegateDragFactory(dragFactory);
+ScriptingGlobals.add(function copyDragFactory(dragFactory: Doc, asDelegate?: boolean) {
+ return dragFactory instanceof Doc ? (asDelegate ? DocUtils.delegateDragFactory(dragFactory) : DocUtils.copyDragFactory(dragFactory)) : dragFactory;
});
ScriptingGlobals.add(function makeDelegate(proto: any) {
const d = Docs.Create.DelegateDocument(proto, { title: 'child of ' + proto.title });