From 6ffb3b6879fbe8e12b79eb00a316b08bf1993149 Mon Sep 17 00:00:00 2001 From: bobzel Date: Wed, 7 Dec 2022 14:46:03 -0500 Subject: fixed presMovement.none so that no pan or zoom takes place. fixed clicking on a presitem to stop audio playing other items. --- src/client/views/collections/TabDocView.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/client/views/collections/TabDocView.tsx') diff --git a/src/client/views/collections/TabDocView.tsx b/src/client/views/collections/TabDocView.tsx index af1fb175a..a61ae680b 100644 --- a/src/client/views/collections/TabDocView.tsx +++ b/src/client/views/collections/TabDocView.tsx @@ -298,7 +298,7 @@ export class TabDocView extends React.Component { 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(), { willZoom: false }, undefined, []), 100); // keeps the pinned doc in view since the sidebar shifts things + setTimeout(() => DocumentManager.Instance.jumpToDocument(docList.lastElement(), { willPan: true }, 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 { @action focusFunc = (doc: Doc, options: DocFocusOptions) => { const shrinkwrap = options?.originalTarget === this._document && this.view?.ComponentView?.shrinkWrap; - if (options?.willZoom !== false && shrinkwrap && this._document) { + if (options?.willPanZoom !== false && shrinkwrap && this._document) { const focusSpeed = options.zoomTime ?? 500; shrinkwrap(); this._view?.setViewTransition('transform', focusSpeed, () => options?.afterFocus?.(false)); -- cgit v1.2.3-70-g09d2