aboutsummaryrefslogtreecommitdiff
path: root/src/client/goldenLayout.js
diff options
context:
space:
mode:
authorandrewdkim <adkim414@gmail.com>2019-07-19 11:21:47 -0400
committerandrewdkim <adkim414@gmail.com>2019-07-19 11:21:47 -0400
commite453e7010def252b6cc10ad49d64708767c5589b (patch)
tree4353a4be5495acd61d813066d001e2b12da7d207 /src/client/goldenLayout.js
parent9cad9abcf164c7d81b8debf4aa2639d83edd227b (diff)
parent8854d3277541a67aef4187b5d3592bea5a7fcfa2 (diff)
merge from master
Diffstat (limited to 'src/client/goldenLayout.js')
-rw-r--r--src/client/goldenLayout.js19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/client/goldenLayout.js b/src/client/goldenLayout.js
index 54c9c6068..ad78139c1 100644
--- a/src/client/goldenLayout.js
+++ b/src/client/goldenLayout.js
@@ -2271,6 +2271,17 @@
this._dragListener.on('dragStop', this._createDragListener, this);
},
+ destroy: function () {
+ this._dragListener.destroy();
+ this._element = null;
+ this._itemConfig = null;
+ this._dragListener = null;
+ const index = this._layoutManager._dragSources.indexOf(this);
+ if (index > -1) {
+ this._layoutManager._dragSources.splice(index, 1);
+ }
+ },
+
/**
* Callback for the DragListener's dragStart event
*
@@ -3984,9 +3995,11 @@
lm.items.AbstractContentItem.prototype.removeChild.call(this, contentItem, keepChild);
if (this.contentItems.length === 1 && this.config.isClosable === true) {
- childItem = this.contentItems[0];
- this.contentItems = [];
- this.parent.replaceChild(this, childItem, true);
+ // bcz: this has the effect of removing children from the DOM and then re-adding them above where they were before.
+ // in the case of things like an iFrame with a YouTube video, the video will reload for now reason. So let's try leaving these "empty" rows alone.
+ // childItem = this.contentItems[0];
+ // this.contentItems = [];
+ // this.parent.replaceChild(this, childItem, true);
} else {
this.callDownwards('setSize');
this.emitBubblingEvent('stateChanged');