diff options
author | bobzel <zzzman@gmail.com> | 2020-11-05 12:06:23 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2020-11-05 12:06:23 -0500 |
commit | d3e15778ae7d878f8bbd71a81d5ed77f641a3a1b (patch) | |
tree | 3b8d65a6473567ccfa5529a65d8def567bf970e3 | |
parent | 5910435416fea88d81d1868977a421c28ef05b2a (diff) |
changed opening a presentation that is open in minimized mode to move the minimized version to the a right split
-rw-r--r-- | src/client/views/collections/CollectionDockingView.tsx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/client/views/collections/CollectionDockingView.tsx b/src/client/views/collections/CollectionDockingView.tsx index e43f188e7..abe8477e4 100644 --- a/src/client/views/collections/CollectionDockingView.tsx +++ b/src/client/views/collections/CollectionDockingView.tsx @@ -23,6 +23,7 @@ import { TabDocView } from './TabDocView'; import React = require("react"); import { stat } from 'fs'; import { DocumentType } from '../../documents/DocumentTypes'; +import { listSpec } from '../../../fields/Schema'; const _global = (window /* browser */ || global /* node */) as any; @observer @@ -144,7 +145,12 @@ export class CollectionDockingView extends CollectionSubView(doc => doc) { @undoBatch @action public static AddSplit(document: Doc, pullSide: string, stack?: any, panelName?: string) { - if (document.type === DocumentType.PRES && DocListCast(Cast(Doc.UserDoc().myOverlayDocs, Doc, null).data).includes(document)) return false; + if (document.type === DocumentType.PRES) { + const docs = Cast(Cast(Doc.UserDoc().myOverlayDocs, Doc, null).data, listSpec(Doc), []); + if (docs.includes(document)) { + docs.splice(docs.indexOf(document), 1); + } + } if (document._viewType === CollectionViewType.Docking) return CurrentUserUtils.openDashboard(Doc.UserDoc(), document); const tab = Array.from(CollectionDockingView.Instance.tabMap).find(tab => tab.DashDoc === document); |