aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/SelectionManager.ts
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2019-04-16 12:46:06 -0400
committerbob <bcz@cs.brown.edu>2019-04-16 12:46:06 -0400
commita4122573367ef36a9725e09b8447f3edfaa5c6a1 (patch)
tree76fec7e0f5f964efc0af0957681d63fde309e5cc /src/client/util/SelectionManager.ts
parentc6360fb4aed348f6f6a3c7412b6acc0d1990c239 (diff)
parentfeae8f4d314ef389cc544fd3ad0792a6bb04832c (diff)
Merge branch 'master' into presentation_view
Diffstat (limited to 'src/client/util/SelectionManager.ts')
-rw-r--r--src/client/util/SelectionManager.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/client/util/SelectionManager.ts b/src/client/util/SelectionManager.ts
index c56f6a4ff..320553952 100644
--- a/src/client/util/SelectionManager.ts
+++ b/src/client/util/SelectionManager.ts
@@ -28,6 +28,16 @@ export namespace SelectionManager {
manager.SelectedDocuments = [];
MainOverlayTextBox.Instance.SetTextDoc();
}
+ @action
+ ReselectAll() {
+ let sdocs = manager.SelectedDocuments.map(d => d);
+ manager.SelectedDocuments = [];
+ return sdocs;
+ }
+ @action
+ ReselectAll2(sdocs: DocumentView[]) {
+ sdocs.map(s => SelectionManager.SelectDoc(s, false));
+ }
}
const manager = new Manager();
@@ -52,6 +62,10 @@ export namespace SelectionManager {
if (found) manager.SelectDoc(found, false);
}
+ export function ReselectAll() {
+ let sdocs = manager.ReselectAll();
+ manager.ReselectAll2(sdocs);
+ }
export function SelectedDocuments(): Array<DocumentView> {
return manager.SelectedDocuments;
}