diff options
author | Andy Rickert <andrew_rickert@brown.edu> | 2020-04-22 14:40:45 -0700 |
---|---|---|
committer | Andy Rickert <andrew_rickert@brown.edu> | 2020-04-22 14:40:45 -0700 |
commit | d2884635f82f28e75c69ca25919800c9cd91f925 (patch) | |
tree | 25af39c2a36eec9f3ebd8f9d7d5524723396e2cb /src/new_fields/Doc.ts | |
parent | 0e192cd810be35c9c81cd93e8f4d550d8fe02d59 (diff) |
scripting buttons
Diffstat (limited to 'src/new_fields/Doc.ts')
-rw-r--r-- | src/new_fields/Doc.ts | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/new_fields/Doc.ts b/src/new_fields/Doc.ts index bcf0d1aec..c54806f37 100644 --- a/src/new_fields/Doc.ts +++ b/src/new_fields/Doc.ts @@ -918,4 +918,12 @@ Scripting.addGlobal(function selectedDocs(container: Doc, excludeCollections: bo return docs.length ? new List(docs) : prevValue; }); Scripting.addGlobal(function setDocFilter(container: Doc, key: string, value: any, modifiers?: "check" | "x" | undefined) { Doc.setDocFilter(container, key, value, modifiers); }); -Scripting.addGlobal(function setDocFilterRange(container: Doc, key: string, range: number[]) { Doc.setDocFilterRange(container, key, range); });
\ No newline at end of file +Scripting.addGlobal(function setDocFilterRange(container: Doc, key: string, range: number[]) { Doc.setDocFilterRange(container, key, range); }); +Scripting.addGlobal(function handleNodeChange(doc: any) { + console.log("oi"); + doc.handleNodeChange(); + + // const dv = DocumentManager.Instance.getDocumentView(doc); + // if (dv?.props.Document.layoutKey === layoutKey) dv?.switchViews(otherKey !== "layout", otherKey.replace("layout_", "")); + // else dv?.switchViews(true, layoutKey.replace("layout_", "")); +});
\ No newline at end of file |