aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/collectionFreeForm
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/collections/collectionFreeForm')
-rw-r--r--src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
index 8a97797c7..57cccec4a 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
@@ -1532,17 +1532,18 @@ export class CollectionFreeFormView extends CollectionSubView<Partial<collection
@action
scrollFocus = (anchor: Doc, smooth: boolean) => {
- let focusSpeed: Opt<number>;
- PresBox.restoreTargetDocView(
+ const focusSpeed = !smooth ? 0 : NumCast(anchor.presTransition);
+ return PresBox.restoreTargetDocView(
this.rootDoc, //
{ pinDocLayout: BoolCast(anchor.presPinDocLayout) },
anchor,
- (focusSpeed = !smooth ? 0 : NumCast(anchor.presTransition)),
+ focusSpeed,
{
pannable: anchor.presPinData ? true : false,
}
- );
- return focusSpeed;
+ )
+ ? focusSpeed
+ : undefined;
}; // sets viewing information for a componentview, typically when following a link. 'preview' tells the view to use the values without writing to the document
getAnchor = () => {