diff options
author | bob <bcz@cs.brown.edu> | 2019-09-19 11:29:11 -0400 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2019-09-19 11:29:11 -0400 |
commit | 2cdca63ac039a7c66a9c93acb35fe51467269e64 (patch) | |
tree | b0916460d0df324596432e0e1d4f61fff889bd40 /src/client/views/MainView.tsx | |
parent | bf4f4cb2e2997cb0ff6c86eef68b3d6b0310f319 (diff) |
switche calls to COllectionDockingView... to addDocTabs. fixed following links to navigate/restore properly.
Diffstat (limited to 'src/client/views/MainView.tsx')
-rw-r--r-- | src/client/views/MainView.tsx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx index 8b0caf9a6..097040b6c 100644 --- a/src/client/views/MainView.tsx +++ b/src/client/views/MainView.tsx @@ -288,6 +288,7 @@ export class MainView extends React.Component { } } }, 100); + return true; } onDrop = (e: React.DragEvent<HTMLDivElement>) => { @@ -319,7 +320,7 @@ export class MainView extends React.Component { <DocumentView Document={mainCont} DataDoc={undefined} addDocument={undefined} - addDocTab={emptyFunction} + addDocTab={this.addDocTabFunc} pinToPres={emptyFunction} onClick={undefined} ruleProvider={undefined} @@ -368,11 +369,14 @@ export class MainView extends React.Component { document.removeEventListener("pointerup", this.onPointerUp); } flyoutWidthFunc = () => this.flyoutWidth; - addDocTabFunc = (doc: Doc) => { + addDocTabFunc = (doc: Doc, data: Opt<Doc>, where: string) => { + if (where === "close") + return CollectionDockingView.CloseRightSplit(doc); if (doc.dockingConfig) { this.openWorkspace(doc); + return true; } else { - CollectionDockingView.Instance.AddRightSplit(doc, undefined); + return CollectionDockingView.AddRightSplit(doc, undefined); } } @computed |