diff options
| author | bobzel <zzzman@gmail.com> | 2022-11-17 11:00:06 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2022-11-17 11:00:06 -0500 |
| commit | 30e7fc1b2cb4b5c5f8d5f5e4f808b91e69629245 (patch) | |
| tree | eebb234b17b611bc89cd4813cf14556466f18736 /src/client/views/collections/collectionFreeForm | |
| parent | 54dc7b2c44194d98111100bc1350b7ac6c5901bc (diff) | |
fixed pushpin behaviors by not animating when anchor viewspec already matched document. fixed recording button highlighting. switched LinkEditor to edit properties of destination insteqad of source anchor
Diffstat (limited to 'src/client/views/collections/collectionFreeForm')
| -rw-r--r-- | src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx | 11 |
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 = () => { |
