aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/SelectionManager.ts
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2019-04-16 12:38:42 -0400
committerbob <bcz@cs.brown.edu>2019-04-16 12:38:42 -0400
commitfeae8f4d314ef389cc544fd3ad0792a6bb04832c (patch)
treeb3d6d1fd3675557fc60c3b34f4d939d8fe153ff9 /src/client/util/SelectionManager.ts
parentbb935a1af68c3684640cf93e04b55324142b05ea (diff)
fixed some text focus issues. fixed contextmenu a bit. removed upload files.
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;
}