Fix regression in adding to display layouts (#2408)

* Removed policy preventing duplicate composition, and implemented no-op in composition provider instead

* Change order of edit on drop event listener

* Add mutation listener to CompositionCollection even if nothing listening to collection

* Updated test specs

* Address review comments

* Fix regression

* Removed redundant composition creation
This commit is contained in:
Andrew Henry 2019-05-24 11:55:16 -07:00 committed by Pegah Sarram
parent d0e08f1d9a
commit f5c48b7bf6

View File

@ -74,6 +74,13 @@ export default {
if (!this.currentObject) {
return;
}
this.composition = this.openmct.composition.get(this.currentObject);
if (this.composition) {
this.composition._synchronize();
this.loadComposition();
}
this.viewContainer = document.createElement('div');
this.viewContainer.classList.add('c-object-view','u-contents');
this.$el.append(this.viewContainer);
@ -125,12 +132,6 @@ export default {
this.currentObject = mutatedObject;
});
this.composition = this.openmct.composition.get(this.currentObject);
if (this.composition) {
this.composition._synchronize();
this.loadComposition();
}
this.viewKey = viewKey;
this.updateView(immediatelySelect);
},