mirror of
https://github.com/nasa/openmct.git
synced 2025-01-09 14:32:43 +00:00
Consistent composition order (#2209)
* ensure composition loads in specified order * Remove Modern JS to match current style guide
This commit is contained in:
parent
e710cafb2c
commit
4bda4080d2
@ -177,7 +177,15 @@ define([
|
|||||||
CompositionCollection.prototype.load = function () {
|
CompositionCollection.prototype.load = function () {
|
||||||
return this.provider.load(this.domainObject)
|
return this.provider.load(this.domainObject)
|
||||||
.then(function (children) {
|
.then(function (children) {
|
||||||
return Promise.all(children.map(this.onProviderAdd, this));
|
return Promise.all(children.map(function (c) {
|
||||||
|
return this.publicAPI.objects.get(c);
|
||||||
|
}, this));
|
||||||
|
}.bind(this))
|
||||||
|
.then(function (childObjects) {
|
||||||
|
childObjects.forEach(function (c) {
|
||||||
|
this.add(c, true);
|
||||||
|
}, this);
|
||||||
|
return childObjects;
|
||||||
}.bind(this))
|
}.bind(this))
|
||||||
.then(function (children) {
|
.then(function (children) {
|
||||||
this.emit('load');
|
this.emit('load');
|
||||||
|
Loading…
Reference in New Issue
Block a user