aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2019-07-29 19:22:05 -0400
committerBob Zeleznik <zzzman@gmail.com>2019-07-29 19:22:05 -0400
commit1b1aace8b3d7f5511d8fe9b2fdc0ad6f88738207 (patch)
treea309bcc0a12b76c6a9dcb85c5a5fe3b4ec338d46 /src
parentae3e8e1497eb172d80b12cfc980a10486adabd8b (diff)
parentd7af2cae3ec66ca9a8c9abbc0a221ee1dbb6d101 (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web
Diffstat (limited to 'src')
-rw-r--r--src/client/views/collections/CollectionDockingView.tsx15
-rw-r--r--src/new_fields/SchemaHeaderField.ts1
2 files changed, 14 insertions, 2 deletions
diff --git a/src/client/views/collections/CollectionDockingView.tsx b/src/client/views/collections/CollectionDockingView.tsx
index d7b5262b1..ab4d1aa62 100644
--- a/src/client/views/collections/CollectionDockingView.tsx
+++ b/src/client/views/collections/CollectionDockingView.tsx
@@ -211,7 +211,20 @@ export class CollectionDockingView extends React.Component<SubCollectionViewProp
}
let docContentConfig = CollectionDockingView.makeDocumentConfig(document, dataDocument);
var newContentItem = stack.layoutManager.createContentItem(docContentConfig, this._goldenLayout);
- stack.addChild(newContentItem.contentItems[0], undefined);
+ if (stack === undefined) {
+ if (this._goldenLayout.root.contentItems.length === 0) {
+ this._goldenLayout.root.addChild(newContentItem);
+ } else {
+ const rowOrCol = this._goldenLayout.root.contentItems[0];
+ if (rowOrCol.contentItems.length) {
+ rowOrCol.contentItems[0].addChild(newContentItem);
+ } else {
+ rowOrCol.addChild(newContentItem);
+ }
+ }
+ } else {
+ stack.addChild(newContentItem.contentItems[0], undefined);
+ }
this.layoutChanged();
}
diff --git a/src/new_fields/SchemaHeaderField.ts b/src/new_fields/SchemaHeaderField.ts
index d124a3907..d5da56b10 100644
--- a/src/new_fields/SchemaHeaderField.ts
+++ b/src/new_fields/SchemaHeaderField.ts
@@ -49,7 +49,6 @@ export class SchemaHeaderField extends ObjectField {
type: number;
constructor(heading: string = "", color?: string, type?: ColumnType) {
- console.log("CREATING SCHEMA HEADER FIELD");
super();
this.heading = heading;