diff options
| author | bob <bcz@cs.brown.edu> | 2019-04-08 18:07:13 -0400 |
|---|---|---|
| committer | bob <bcz@cs.brown.edu> | 2019-04-08 18:07:13 -0400 |
| commit | a72fcdd0ebc06a3c851007c6ed89ab13a9a0d835 (patch) | |
| tree | a7f7d017f85566ce70a35cff748a26624339fc08 /src/client/util | |
| parent | 3a9f6df918ad45e55b0c6a540cb566aff4940288 (diff) | |
fixed up a bunch of small things + started on text wackiness.
Diffstat (limited to 'src/client/util')
| -rw-r--r-- | src/client/util/DocumentManager.ts | 2 | ||||
| -rw-r--r-- | src/client/util/DragManager.ts | 3 | ||||
| -rw-r--r-- | src/client/util/SelectionManager.ts | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/src/client/util/DocumentManager.ts b/src/client/util/DocumentManager.ts index bf59fbb43..341959936 100644 --- a/src/client/util/DocumentManager.ts +++ b/src/client/util/DocumentManager.ts @@ -29,7 +29,7 @@ export class DocumentManager { public getAllDocumentViews(collection: Document) { return this.DocumentViews.filter(dv => - dv.props.ContainingCollectionView && dv.props.ContainingCollectionView.props.Document == collection); + dv.props.ContainingCollectionView && dv.props.ContainingCollectionView.props.Document.Id === collection.Id); } public getDocumentView(toFind: Document): DocumentView | null { diff --git a/src/client/util/DragManager.ts b/src/client/util/DragManager.ts index c1919093e..0ee7ed2b3 100644 --- a/src/client/util/DragManager.ts +++ b/src/client/util/DragManager.ts @@ -1,7 +1,5 @@ import { action } from "mobx"; import { Document } from "../../fields/Document"; -import { ImageField } from "../../fields/ImageField"; -import { KeyStore } from "../../fields/KeyStore"; import { CollectionDockingView } from "../views/collections/CollectionDockingView"; import { CollectionView } from "../views/collections/CollectionView"; import { DocumentDecorations } from "../views/DocumentDecorations"; @@ -18,6 +16,7 @@ export function setupDrag( e.stopPropagation(); e.preventDefault(); + // TODO: bcz -- this needs to have a drag threshold so that it doesn't trigger when just selecting. document.removeEventListener("pointermove", onRowMove); document.removeEventListener("pointerup", onRowUp); var dragData = new DragManager.DocumentDragData([docFunc()]); diff --git a/src/client/util/SelectionManager.ts b/src/client/util/SelectionManager.ts index 958c14491..79d4ceb25 100644 --- a/src/client/util/SelectionManager.ts +++ b/src/client/util/SelectionManager.ts @@ -1,6 +1,7 @@ import { observable, action } from "mobx"; import { DocumentView } from "../views/nodes/DocumentView"; import { Document } from "../../fields/Document"; +import { Main } from "../views/Main"; export namespace SelectionManager { class Manager { @@ -40,6 +41,7 @@ export namespace SelectionManager { } manager.SelectedDocuments.length = 0; if (found) manager.SelectedDocuments.push(found); + Main.Instance.SetTextDoc(undefined, undefined); } export function SelectedDocuments(): Array<DocumentView> { |
