diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/collections/TabDocView.tsx | 31 | ||||
-rw-r--r-- | src/mobile/MobileInterface.tsx | 2 |
2 files changed, 16 insertions, 17 deletions
diff --git a/src/client/views/collections/TabDocView.tsx b/src/client/views/collections/TabDocView.tsx index 30fa33b52..7522affa7 100644 --- a/src/client/views/collections/TabDocView.tsx +++ b/src/client/views/collections/TabDocView.tsx @@ -213,11 +213,11 @@ export class TabDocView extends React.Component<TabDocViewProps> { public static PinDoc(docs: Doc | Doc[], pinProps?: PinProps) { const docList = docs instanceof Doc ? [docs] : docs; - let curPres = Doc.ActivePresentation - console.log(curPres) + let curPres = Doc.ActivePresentation; + console.log(curPres); if (!curPres) { curPres = Doc.MakeCopy(Doc.UserDoc().emptyPresentation as Doc, true); - Doc.ActivePresentation = curPres + Doc.ActivePresentation = curPres; } curPres && @@ -271,19 +271,18 @@ export class TabDocView extends React.Component<TabDocViewProps> { PresBox.Instance?.clearSelectedArray(); pinDoc && PresBox.Instance?.addToSelectedArray(pinDoc); //Update selected array }); - if ( - CollectionDockingView.Instance && - !Array.from(CollectionDockingView.Instance.tabMap) - .map(d => d.DashDoc) - .includes(curPres) - ) { - const docs = Cast(Doc.MyOverlayDocs.data, listSpec(Doc), []); - if (docs.includes(curPres)) docs.splice(docs.indexOf(curPres), 1); - CollectionDockingView.AddSplit(curPres, 'right'); - setTimeout(() => DocumentManager.Instance.jumpToDocument(docList.lastElement(), 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 - } + if ( + CollectionDockingView.Instance && + !Array.from(CollectionDockingView.Instance.tabMap) + .map(d => d.DashDoc) + .includes(curPres) + ) { + const docs = Cast(Doc.MyOverlayDocs.data, listSpec(Doc), []); + if (docs.includes(curPres)) docs.splice(docs.indexOf(curPres), 1); + CollectionDockingView.AddSplit(curPres, 'right'); + setTimeout(() => DocumentManager.Instance.jumpToDocument(docList.lastElement(), false, undefined, []), 100); // keeps the pinned doc in view since the sidebar shifts things + } + } componentDidMount() { new _global.ResizeObserver( diff --git a/src/mobile/MobileInterface.tsx b/src/mobile/MobileInterface.tsx index f19496d25..8265de445 100644 --- a/src/mobile/MobileInterface.tsx +++ b/src/mobile/MobileInterface.tsx @@ -832,7 +832,7 @@ export class MobileInterface extends React.Component { </div> {this.switchMenuView} {this.inkMenu} - <GestureOverlay> + <GestureOverlay isActive={true}> <div style={{ display: 'none' }}> <RichTextMenu key="rich" /> </div> |