aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx')
-rw-r--r--src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx5
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);
}
}