diff options
| author | Eleanor Eng <eleanor_eng@brown.edu> | 2019-05-04 16:44:22 -0400 |
|---|---|---|
| committer | Eleanor Eng <eleanor_eng@brown.edu> | 2019-05-04 16:44:40 -0400 |
| commit | cecd09917f23fc83c87cffc4fddf5fe1f8331bac (patch) | |
| tree | ab7144d36046aaada287c2ce14d2fe7722585dce /src/client/util/SelectionManager.ts | |
| parent | 0bf0b028b1af8b9481e369c754277af5fb8b3fcd (diff) | |
| parent | 1ccabe155cb4f23c0aa7e37f91cd4a303008b8c7 (diff) | |
merge with master
Diffstat (limited to 'src/client/util/SelectionManager.ts')
| -rw-r--r-- | src/client/util/SelectionManager.ts | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/client/util/SelectionManager.ts b/src/client/util/SelectionManager.ts index 92d78696e..fe5acf4b4 100644 --- a/src/client/util/SelectionManager.ts +++ b/src/client/util/SelectionManager.ts @@ -1,9 +1,7 @@ import { observable, action } from "mobx"; -import { DocumentView } from "../views/nodes/DocumentView"; -import { Document } from "../../fields/Document"; -import { Main } from "../views/Main"; +import { Doc } from "../../new_fields/Doc"; import { MainOverlayTextBox } from "../views/MainOverlayTextBox"; -import { DragManager } from "./DragManager"; +import { DocumentView } from "../views/nodes/DocumentView"; export namespace SelectionManager { class Manager { @@ -51,7 +49,7 @@ export namespace SelectionManager { return manager.SelectedDocuments.indexOf(doc) !== -1; } - export function DeselectAll(except?: Document): void { + export function DeselectAll(except?: Doc): void { let found: DocumentView | undefined = undefined; if (except) { for (const view of manager.SelectedDocuments) { @@ -65,7 +63,7 @@ export namespace SelectionManager { export function ReselectAll() { let sdocs = manager.ReselectAll(); - manager.ReselectAll2(sdocs); + setTimeout(() => manager.ReselectAll2(sdocs), 0); } export function SelectedDocuments(): Array<DocumentView> { return manager.SelectedDocuments; |
