mirror of
https://github.com/nasa/openmct.git
synced 2025-04-11 21:31:06 +00:00
load composition using less code
This commit is contained in:
parent
d51dd8b7d0
commit
e4a6c21101
@ -34,8 +34,6 @@ export default class ConditionManager extends EventEmitter {
|
||||
this.composition = this.openmct.composition.get(conditionSetDomainObject);
|
||||
this.composition.on('add', this.addTelemetry, this);
|
||||
this.composition.on('remove', this.removeTelemetry, this);
|
||||
|
||||
this.loaded = this.composition.load();
|
||||
this.subscriptions = {};
|
||||
this.initialize();
|
||||
|
||||
@ -68,10 +66,6 @@ export default class ConditionManager extends EventEmitter {
|
||||
delete this.subscriptions[id];
|
||||
}
|
||||
|
||||
load() {
|
||||
return this.loaded;
|
||||
}
|
||||
|
||||
initialize() {
|
||||
this.conditionResults = {};
|
||||
this.conditionClassCollection = [];
|
||||
@ -238,7 +232,7 @@ export default class ConditionManager extends EventEmitter {
|
||||
return Promise.resolve([]);
|
||||
}
|
||||
|
||||
return this.load().then(() => {
|
||||
return this.composition.load().then(() => {
|
||||
const ladConditionResults = this.conditionClassCollection
|
||||
.map(condition => condition.requestLADConditionResult());
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user