diff options
| author | bob <bcz@cs.brown.edu> | 2019-12-16 12:08:23 -0500 |
|---|---|---|
| committer | bob <bcz@cs.brown.edu> | 2019-12-16 12:08:23 -0500 |
| commit | e9d2663d616e4eddb3097145f1b3198c8ef6bcbf (patch) | |
| tree | ac4e122c8ac05f6cb965cdae972f0467dd2188c1 /src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx | |
| parent | 4d4a1438ac87d36c01b8ca084564cc7ad1cd3b0d (diff) | |
fixes for focusing on docs after treeview menu item
Diffstat (limited to 'src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx')
| -rw-r--r-- | src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx index e9c3f6b0f..058022ab4 100644 --- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx +++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx @@ -13,7 +13,7 @@ import { BoolCast, Cast, DateCast, NumCast, StrCast } from "../../../../new_fiel import { CurrentUserUtils } from "../../../../server/authentication/models/current_user_utils"; import { aggregateBounds, emptyFunction, intersectRect, returnOne, Utils } from "../../../../Utils"; import { DocServer } from "../../../DocServer"; -import { Docs } from "../../../documents/Documents"; +import { Docs, DocUtils } from "../../../documents/Documents"; import { DocumentType } from "../../../documents/DocumentTypes"; import { DocumentManager } from "../../../util/DocumentManager"; import { DragManager } from "../../../util/DragManager"; @@ -559,6 +559,10 @@ export class CollectionFreeFormView extends CollectionSubView(PanZoomDocument) { focusDocument = (doc: Doc, willZoom: boolean, scale?: number, afterFocus?: () => boolean) => { const state = HistoryUtil.getState(); + Doc.linkFollowHighlight(doc); + if (doc.z) { + return; + } // TODO This technically isn't correct if type !== "doc", as // currently nothing is done, but we should probably push a new state if (state.type === "doc" && this.Document.panX !== undefined && this.Document.panY !== undefined) { |
