diff options
| author | bobzel <zzzman@gmail.com> | 2021-01-19 15:02:03 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2021-01-19 15:02:03 -0500 |
| commit | 8538a83baf57d7015b62b4ebc22d2bd7318f9d16 (patch) | |
| tree | 7791f2514df785a3a14cf866e7ba47305be88526 /src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx | |
| parent | 28bed25b20f2882cb40e616e2ecdd7cf0793e105 (diff) | |
fixed isPushpin annotation behavior outside of PDFs. fixed link follow highlighting to go away when target is hidden.
Diffstat (limited to 'src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx')
| -rw-r--r-- | src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx index f934fcd92..588ba6922 100644 --- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx +++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx @@ -945,17 +945,18 @@ export class CollectionFreeFormView extends CollectionSubView<PanZoomDocument, P const newAfterFocus = (didFocus: boolean) => { afterFocus && setTimeout(() => { // @ts-ignore - if (afterFocus?.(didFocus || (newPanX !== savedState.px || newPanY !== savedState.py))) { + if (afterFocus?.(!dontCenter && (didFocus || (newPanX !== savedState.px || newPanY !== savedState.py)))) { this.Document._panX = savedState.px; this.Document._panY = savedState.py; this.Document[this.scaleFieldKey] = savedState.s; this.Document._viewTransition = savedState.pt; } + doc.hidden && Doc.UnHighlightDoc(doc); }, newPanX !== savedState.px || newPanY !== savedState.py ? 500 : 0); return false; }; this.props.focus(this.props.Document, undefined, undefined, newAfterFocus, undefined, newDidFocus); - Doc.linkFollowHighlight(doc); + !doc.hidden && Doc.linkFollowHighlight(doc); } } |
