aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/SelectionManager.ts
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2020-06-28 11:55:49 -0400
committerBob Zeleznik <zzzman@gmail.com>2020-06-28 11:55:49 -0400
commit2b9e542ea0e62b13e1f9e0b51f3cfb8e2ce8f78d (patch)
tree5eda7fd16f907ecc0bcf57da77fc286d776f558c /src/client/util/SelectionManager.ts
parent83ce7f1ad7c2e1b691dbdc67408cee7c65d669b8 (diff)
slightly improved layout of workspace facet filter box
Diffstat (limited to 'src/client/util/SelectionManager.ts')
-rw-r--r--src/client/util/SelectionManager.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/client/util/SelectionManager.ts b/src/client/util/SelectionManager.ts
index eb905d237..0f204bba4 100644
--- a/src/client/util/SelectionManager.ts
+++ b/src/client/util/SelectionManager.ts
@@ -3,6 +3,8 @@ import { Doc } from "../../fields/Doc";
import { DocumentView } from "../views/nodes/DocumentView";
import { computedFn } from "mobx-utils";
import { List } from "../../fields/List";
+import { Scripting } from "./Scripting";
+import { DocumentManager } from "./DocumentManager";
export namespace SelectionManager {
@@ -86,3 +88,9 @@ export namespace SelectionManager {
}
}
+
+Scripting.addGlobal(function selectDoc(doc: any) {
+ const view = DocumentManager.Instance.getDocumentView(doc);
+ view && SelectionManager.SelectDoc(view, false);
+ //Doc.UserDoc().activeSelection = new List([doc]);
+}); \ No newline at end of file