Merge pull request #2754 from nasa/conditions-observables

[Conditions] Remove uneccessary update function
This commit is contained in:
Shefali Joshi 2020-03-17 11:05:46 -07:00 committed by GitHub
commit 500ab52476
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,7 +34,7 @@ export default class ConditionManager extends EventEmitter {
this.initialize();
this.stopObservingForChanges = this.openmct.objects.observe(this.conditionSetDomainObject, '*', (newDomainObject) => {
this.update(newDomainObject);
this.conditionSetDomainObject = newDomainObject;
});
}
@ -48,15 +48,6 @@ export default class ConditionManager extends EventEmitter {
}
}
update(newDomainObject) {
this.destroy();
this.conditionSetDomainObject = newDomainObject;
this.stopObservingForChanges = this.openmct.objects.observe(this.conditionSetDomainObject, '*', (newDO) => {
this.update(newDO);
});
this.initialize();
}
updateCondition(conditionConfiguration, index) {
let condition = this.conditionClassCollection[index];
condition.update(conditionConfiguration);