diff options
| author | bob <bcz@cs.brown.edu> | 2019-12-20 15:22:23 -0500 |
|---|---|---|
| committer | bob <bcz@cs.brown.edu> | 2019-12-20 15:22:23 -0500 |
| commit | 218a04638200b27b6b9132ca9086bb4d76740acf (patch) | |
| tree | 26ca7d5169161bc82359b69a479fe727ccf7f0ad /src/new_fields | |
| parent | e8606ffee44b934deea5878afd110e39ec1ae63c (diff) | |
minor cleanup
Diffstat (limited to 'src/new_fields')
| -rw-r--r-- | src/new_fields/Doc.ts | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/new_fields/Doc.ts b/src/new_fields/Doc.ts index a969a8359..8e0b28606 100644 --- a/src/new_fields/Doc.ts +++ b/src/new_fields/Doc.ts @@ -756,6 +756,7 @@ Scripting.addGlobal(function docList(field: any) { return DocListCast(field); }) Scripting.addGlobal(function sameDocs(doc1: any, doc2: any) { return Doc.AreProtosEqual(doc1, doc2); }); Scripting.addGlobal(function undo() { return UndoManager.Undo(); }); Scripting.addGlobal(function redo() { return UndoManager.Redo(); }); +Scripting.addGlobal(function selectDoc(doc: any) { Doc.UserDoc().SelectedDocs = new List([doc]); }); Scripting.addGlobal(function selectedDocs(container: Doc, excludeCollections: boolean, prevValue: any) { const docs = DocListCast(Doc.UserDoc().SelectedDocs).filter(d => !Doc.AreProtosEqual(d, container) && !d.annotationOn && d.type !== DocumentType.DOCUMENT && d.type !== DocumentType.KVP && (!excludeCollections || !Cast(d.data, listSpec(Doc), null))); return docs.length ? new List(docs) : prevValue; |
