diff options
| author | bobzel <zzzman@gmail.com> | 2022-09-21 18:18:31 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2022-09-21 18:18:31 -0400 |
| commit | b1ec42d48e5430cdfe8e6397d500af31efc76893 (patch) | |
| tree | 6b80eed341c7af83afac98b14fb3b0bbbf6fd6f8 /src/client/views | |
| parent | 69719257b8275cb19d63960a6ec552a0c118d988 (diff) | |
fixed issues with deleting last stack, or deleting stacks and leaving only row/cols in goldenLayout
Diffstat (limited to 'src/client/views')
| -rw-r--r-- | src/client/views/collections/CollectionDockingView.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/collections/CollectionDockingView.tsx b/src/client/views/collections/CollectionDockingView.tsx index 25fe5fe43..c6ac5ee0c 100644 --- a/src/client/views/collections/CollectionDockingView.tsx +++ b/src/client/views/collections/CollectionDockingView.tsx @@ -477,6 +477,7 @@ export class CollectionDockingView extends CollectionSubView() { }; stackCreated = (stack: any) => { + stack = stack.header ? stack : stack.origin; stack.header?.element.on('mousedown', (e: any) => { const dashboard = Doc.ActiveDashboard; if (dashboard && e.target === stack.header?.element[0] && e.button === 2) { @@ -499,7 +500,7 @@ export class CollectionDockingView extends CollectionSubView() { .click( action(() => { //if (confirm('really close this?')) { - if (!stack.parent.parent.isRoot || stack.parent.contentItems.length > 1) { + if ((!stack.parent.isRoot && !stack.parent.parent.isRoot) || stack.parent.contentItems.length > 1) { stack.remove(); } else { alert('cant delete the last stack'); |
