aboutsummaryrefslogtreecommitdiff
path: root/src/client/util
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2019-12-15 10:38:23 -0500
committerBob Zeleznik <zzzman@gmail.com>2019-12-15 10:38:23 -0500
commit877a6f481a06e2454ff9d8eabe43acb0e58a2676 (patch)
treeb03669d95f6d8293376831e406d91c2b35b08e51 /src/client/util
parent24a9257a0dadaed4a6e31a54b5936668f2d34e6f (diff)
writing selectedDocs to user doc to allow selection to be part of scripting
Diffstat (limited to 'src/client/util')
-rw-r--r--src/client/util/DragManager.ts2
-rw-r--r--src/client/util/SelectionManager.ts3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/client/util/DragManager.ts b/src/client/util/DragManager.ts
index 2631a1e3c..df2f5fe3c 100644
--- a/src/client/util/DragManager.ts
+++ b/src/client/util/DragManager.ts
@@ -51,7 +51,7 @@ export function SetupDrag(
e.stopPropagation();
if (e.shiftKey && CollectionDockingView.Instance) {
e.persist();
- let dragDoc = await docFunc();
+ const dragDoc = await docFunc();
dragDoc && CollectionDockingView.Instance.StartOtherDrag({
pageX: e.pageX,
pageY: e.pageY,
diff --git a/src/client/util/SelectionManager.ts b/src/client/util/SelectionManager.ts
index e01216e0f..d9283de35 100644
--- a/src/client/util/SelectionManager.ts
+++ b/src/client/util/SelectionManager.ts
@@ -2,6 +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";
export namespace SelectionManager {
@@ -27,6 +29,7 @@ export namespace SelectionManager {
manager.SelectedDocuments.clear();
manager.SelectedDocuments.set(docView, true);
}
+ Doc.UserDoc().SelectedDocs = new List(SelectionManager.SelectedDocuments().map(dv => dv.props.Document));
}
@action
DeselectDoc(docView: DocumentView): void {