diff options
author | Andy Rickert <andrew_rickert@brown.edu> | 2020-05-12 17:37:54 -0700 |
---|---|---|
committer | Andy Rickert <andrew_rickert@brown.edu> | 2020-05-12 17:37:54 -0700 |
commit | 9ad062907d38a7a853ba89fa31433380ae3cd7b3 (patch) | |
tree | 707855e1bc6fa8ac3d1f51447815a51eb83b8aa3 /src/client/util/SelectionManager.ts | |
parent | 1848c78f889470d6c558f709efe1b521402b2793 (diff) | |
parent | 4bd011dcc6a3f009fa10932c7c6ca1932b784fde (diff) |
merge
Diffstat (limited to 'src/client/util/SelectionManager.ts')
-rw-r--r-- | src/client/util/SelectionManager.ts | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/client/util/SelectionManager.ts b/src/client/util/SelectionManager.ts index a49977c42..11d2cafb2 100644 --- a/src/client/util/SelectionManager.ts +++ b/src/client/util/SelectionManager.ts @@ -11,7 +11,6 @@ export namespace SelectionManager { @observable IsDragging: boolean = false; SelectedDocuments: ObservableMap<DocumentView, boolean> = new ObservableMap(); - @action SelectDoc(docView: DocumentView, ctrlPressed: boolean): void { // if doc is not in SelectedDocuments, add it @@ -55,6 +54,8 @@ export namespace SelectionManager { manager.SelectDoc(docView, ctrlPressed); } + export function SetIsDragging(dragging: boolean) { runInAction(() => manager.IsDragging = dragging); } + export function GetIsDragging() { return manager.IsDragging; } // computed functions, such as used in IsSelected generate errors if they're called outside of a // reaction context. Specifying the context with 'outsideReaction' allows an efficiency feature // to avoid unnecessary mobx invalidations when running inside a reaction. @@ -78,9 +79,6 @@ export namespace SelectionManager { if (found) manager.SelectDoc(found, false); } - export function SetIsDragging(dragging: boolean) { runInAction(() => manager.IsDragging = dragging); } - export function GetIsDragging() { return manager.IsDragging; } - export function SelectedDocuments(): Array<DocumentView> { return Array.from(manager.SelectedDocuments.keys()); } |