aboutsummaryrefslogtreecommitdiff
path: root/src/fields
diff options
context:
space:
mode:
authorMelissa Zhang <mzhang19096@gmail.com>2020-08-13 17:45:41 -0700
committerMelissa Zhang <mzhang19096@gmail.com>2020-08-13 17:45:41 -0700
commit4852a2bfce1ddc038716f24cfcbf22c1aad88ff0 (patch)
treea3568efe6cf05aae33a6f2e3a99e9d7832e4a650 /src/fields
parent3c56d05d401d2015545bd42868f4fc553db6944b (diff)
parent3debb7fedcd9c955ede46e57d4da182a5fa9acae (diff)
merge with master
Diffstat (limited to 'src/fields')
-rw-r--r--src/fields/ScriptField.ts4
-rw-r--r--src/fields/documentSchemas.ts2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/fields/ScriptField.ts b/src/fields/ScriptField.ts
index 4cc3a7cc7..9391f56ac 100644
--- a/src/fields/ScriptField.ts
+++ b/src/fields/ScriptField.ts
@@ -56,6 +56,9 @@ async function deserializeScript(script: ScriptField) {
if (script.script.originalScript === 'self.userDoc.noviceMode') {
return (script as any).script = (ScriptField.NoviceMode ?? (ScriptField.NoviceMode = ComputedField.MakeFunction('self.userDoc.noviceMode')))?.script;
}
+ if (script.script.originalScript === `selectMainMenu(self)`) {
+ return (script as any).script = (ScriptField.SelectMenu ?? (ScriptField.SelectMenu = ComputedField.MakeFunction('selectMainMenu(self)')))?.script;
+ }
const captures: ProxyField<Doc> = (script as any).captures;
if (captures) {
const doc = (await captures.value())!;
@@ -89,6 +92,7 @@ export class ScriptField extends ObjectField {
public static DeiconifyView: Opt<ScriptField>;
public static ConvertToButtons: Opt<ScriptField>;
public static NoviceMode: Opt<ScriptField>;
+ public static SelectMenu: Opt<ScriptField>;
constructor(script: CompiledScript, setterscript?: CompiledScript) {
super();
diff --git a/src/fields/documentSchemas.ts b/src/fields/documentSchemas.ts
index ada13226e..848a648e1 100644
--- a/src/fields/documentSchemas.ts
+++ b/src/fields/documentSchemas.ts
@@ -102,7 +102,7 @@ export const documentSchema = createSchema({
_lockedTransform: "boolean",// whether a freeformview can pan/zoom
// drag drop properties
- stayInCollection: "boolean",// whether document can be dropped into a different collection
+ _stayInCollection: "boolean",// whether document can be dropped into a different collection
dragFactory: Doc, // the document that serves as the "template" for the onDragStart script. ie, to drag out copies of the dragFactory document.
dropAction: "string", // override specifying what should happen when this document is dropped (can be "alias", "copy", "move")
targetDropAction: "string", // allows the target of a drop event to specify the dropAction ("alias", "copy", "move") NOTE: if the document is dropped within the same collection, the dropAction is coerced to 'move'