From 505fa1fe53b2ffc75231f2ee8a66da4be92c76c4 Mon Sep 17 00:00:00 2001 From: bobzel Date: Mon, 29 Aug 2022 16:40:39 -0400 Subject: fixed centering link targets in zoomed images and scrolled docs. stopped highlighting opacity=0 documents --- src/Utils.ts | 4 ++-- .../collectionFreeForm/CollectionFreeFormView.tsx | 19 +++++++++++-------- src/client/views/nodes/DocumentView.scss | 1 - src/fields/Doc.ts | 4 ++-- 4 files changed, 15 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/Utils.ts b/src/Utils.ts index 9e002ebd4..6fc00040f 100644 --- a/src/Utils.ts +++ b/src/Utils.ts @@ -221,8 +221,8 @@ export namespace Utils { if (scrollTop + contextHgt < Math.min(scrollHeight, targetY + minSpacing + targetHgt)) { return Math.ceil(targetY + minSpacing + targetHgt - contextHgt); } - if (scrollTop >= Math.max(0, targetY - minSpacing - targetHgt)) { - return Math.max(0, Math.floor(targetY - minSpacing - targetHgt)); + if (scrollTop >= Math.max(0, targetY - minSpacing)) { + return Math.max(0, Math.floor(targetY - minSpacing)); } } diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx index ede113a9f..c2bd7de54 100644 --- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx +++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx @@ -1141,7 +1141,7 @@ export class CollectionFreeFormView extends CollectionSubView (this._viewTransition = 0)); } + runInAction(() => (this._viewTransition = 0)); return resetView; }; const xf = !cantTransform @@ -1198,10 +1198,13 @@ export class CollectionFreeFormView extends CollectionSubView