aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/SelectionManager.ts
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2019-12-16 00:38:59 -0500
committerBob Zeleznik <zzzman@gmail.com>2019-12-16 00:38:59 -0500
commit01aca20caca1f8736fd7035b8cda35e7c415aa2b (patch)
tree0b80f8a296375f520455b71d9f20fc56d3026f0d /src/client/util/SelectionManager.ts
parent15333069562d265a8bc8e5d1d3ec1bfc564d8796 (diff)
added onclick option for selecting first link target. changed contentFittingDocView to center vertically as well as horizontally
Diffstat (limited to 'src/client/util/SelectionManager.ts')
-rw-r--r--src/client/util/SelectionManager.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/util/SelectionManager.ts b/src/client/util/SelectionManager.ts
index d9283de35..cb7a69295 100644
--- a/src/client/util/SelectionManager.ts
+++ b/src/client/util/SelectionManager.ts
@@ -2,8 +2,8 @@ import { observable, action, runInAction, ObservableMap } from "mobx";
import { Doc } from "../../new_fields/Doc";
import { DocumentView } from "../views/nodes/DocumentView";
import { computedFn } from "mobx-utils";
-import { CurrentUserUtils } from "../../server/authentication/models/current_user_utils";
import { List } from "../../new_fields/List";
+import { Scripting } from "./Scripting";
export namespace SelectionManager {
@@ -81,3 +81,6 @@ export namespace SelectionManager {
return Array.from(manager.SelectedDocuments.keys());
}
}
+
+Scripting.addGlobal(function selectDoc(doc: any) { Doc.UserDoc().SelectedDocs = new List([doc]); });
+