diff options
| author | bobzel <zzzman@gmail.com> | 2020-08-27 23:59:42 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2020-08-27 23:59:42 -0400 |
| commit | 27ebda9dae0f6736aea85dc8309f9dd84cebe145 (patch) | |
| tree | c1b642c66b28b98baf593924b75e10a4547d9f37 /src/client/views/collections/CollectionDockingView.tsx | |
| parent | d74811f0877709ad4005651bbd6eb9213378e45a (diff) | |
added button for creating tabs in header bar. fixed runtimemissing icon errors
Diffstat (limited to 'src/client/views/collections/CollectionDockingView.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionDockingView.tsx | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/client/views/collections/CollectionDockingView.tsx b/src/client/views/collections/CollectionDockingView.tsx index 003f0c514..3d8ac2a23 100644 --- a/src/client/views/collections/CollectionDockingView.tsx +++ b/src/client/views/collections/CollectionDockingView.tsx @@ -642,7 +642,7 @@ export class CollectionDockingView extends CollectionSubView(doc => doc) { stack.layoutManager.on("activeContentItemChanged", this.stackActiveChanged); //stack.header.controlsContainer.find('.lm_popout').hide(); stack.header.element.on('mousedown', (e: any) => { - if (e.target === stack.header.element[0] && e.button === 1) { + if (e.target === stack.header.element[0] && e.button === 2) { const emptyPane = Cast(Doc.UserDoc().emptyPane, Doc, null); emptyPane["dragFactory-count"] = NumCast(emptyPane["dragFactory-count"]) + 1; this.AddTab(stack, Docs.Create.FreeformDocument([], { @@ -674,7 +674,7 @@ export class CollectionDockingView extends CollectionSubView(doc => doc) { // }); stack.header.controlsContainer.find('.lm_close') //get the close icon .off('click') //unbind the current click handler - .click(action(async function () { + .click(action(async () => { //if (confirm('really close this?')) { stack.remove(); @@ -692,8 +692,15 @@ export class CollectionDockingView extends CollectionSubView(doc => doc) { })); stack.header.controlsContainer.find('.lm_popout') //get the close icon .off('click') //unbind the current click handler - .click(action(function () { - stack.config.fixed = !stack.config.fixed; + .click(action(() => { + // stack.config.fixed = !stack.config.fixed; // force the stack to have a fixed size + + const emptyPane = Cast(Doc.UserDoc().emptyPane, Doc, null); + emptyPane["dragFactory-count"] = NumCast(emptyPane["dragFactory-count"]) + 1; + this.AddTab(stack, Docs.Create.FreeformDocument([], { + _width: this.props.PanelWidth(), _height: this.props.PanelHeight(), title: `Untitled Tab ${NumCast(emptyPane["dragFactory-count"])}` + })); + // const url = Utils.prepend("/doc/" + stack.contentItems[0].tab.contentItem.config.props.documentId); // let win = window.open(url, stack.contentItems[0].tab.title, "width=300,height=400"); })); |
