diff options
| author | bobzel <zzzman@gmail.com> | 2022-12-01 10:13:03 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2022-12-01 10:13:03 -0500 |
| commit | 66184a172006de4d4bf72d9da33858e04d298181 (patch) | |
| tree | 9c9fc08d92102410383f7780b4e249616301f8a8 /src/client/views/collections/TabDocView.tsx | |
| parent | 9d88adb19c2caf715b56c5ed40a500b9ef1491aa (diff) | |
refactored process of following links / jumping to docs and added following options for zoomTime, etc instead of setting temporary fields on docs.
Diffstat (limited to 'src/client/views/collections/TabDocView.tsx')
| -rw-r--r-- | src/client/views/collections/TabDocView.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/collections/TabDocView.tsx b/src/client/views/collections/TabDocView.tsx index 7696777fd..13984171c 100644 --- a/src/client/views/collections/TabDocView.tsx +++ b/src/client/views/collections/TabDocView.tsx @@ -297,7 +297,7 @@ export class TabDocView extends React.Component<TabDocViewProps> { const docs = Cast(Doc.MyOverlayDocs.data, listSpec(Doc), []); if (docs.includes(curPres)) docs.splice(docs.indexOf(curPres), 1); CollectionDockingView.AddSplit(curPres, OpenWhereMod.right); - setTimeout(() => DocumentManager.Instance.jumpToDocument(docList.lastElement(), false, undefined, []), 100); // keeps the pinned doc in view since the sidebar shifts things + setTimeout(() => DocumentManager.Instance.jumpToDocument(docList.lastElement(), { willZoom: false }, undefined, []), 100); // keeps the pinned doc in view since the sidebar shifts things } setTimeout(batch.end, 500); // need to wait until dockingview (goldenlayout) updates all its structurs } @@ -376,7 +376,7 @@ export class TabDocView extends React.Component<TabDocViewProps> { focusFunc = (doc: Doc, options: DocFocusOptions) => { const shrinkwrap = options?.originalTarget === this._document && this.view?.ComponentView?.shrinkWrap; if (options?.willZoom !== false && shrinkwrap && this._document) { - const focusSpeed = NumCast(this._document.focusSpeed, 500); + const focusSpeed = options.zoomTime ?? 500; shrinkwrap(); this._document._viewTransition = `transform ${focusSpeed}ms`; setTimeout( |
