diff options
author | bobzel <zzzman@gmail.com> | 2020-09-28 02:10:38 +0000 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2020-09-28 02:10:38 +0000 |
commit | 8fa7ba1fb75d5f1b83230b8be738a64564138a6b (patch) | |
tree | 38fa6a00c6ad47b5213a34e3a67f13441e692cf1 /src | |
parent | e301d23c10d4dd9b7677100bdeba1b02998bf8ac (diff) |
fixed issue with docking view that has only one stack
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/collections/CollectionDockingView.tsx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/client/views/collections/CollectionDockingView.tsx b/src/client/views/collections/CollectionDockingView.tsx index 4685d2ffc..699a0f966 100644 --- a/src/client/views/collections/CollectionDockingView.tsx +++ b/src/client/views/collections/CollectionDockingView.tsx @@ -152,6 +152,8 @@ export class CollectionDockingView extends CollectionSubView(doc => doc) { const newContentItem = instance._goldenLayout.root.layoutManager.createContentItem(newItemStackConfig, instance._goldenLayout); if (instance._goldenLayout.root.contentItems.length === 0) { // if no rows / columns instance._goldenLayout.root.addChild(newContentItem); + } else if (instance._goldenLayout.root.contentItems[0].isStack) { + instance._goldenLayout.root.contentItems[0].addChild(docContentConfig); } else if (instance._goldenLayout.root.contentItems.length === 1 && instance._goldenLayout.root.contentItems[0].contentItems.length === 1 && instance._goldenLayout.root.contentItems[0].contentItems[0].contentItems.length === 0) { instance._goldenLayout.root.contentItems[0].contentItems[0].addChild(docContentConfig); |