mirror of
https://github.com/nasa/openmct.git
synced 2025-04-19 00:27:03 +00:00
[Plot] Update formDomainObject on mutate
When a new series is added to a plot, a plot series form controller is instantiated and passed in a domain object via scope that it will mutate upon changes. If a mutation results in a composition add, then the plot series form controller needs to get a version of the domain object with the updated composition array, which it was not previously doing. This fixes #2120.
This commit is contained in:
parent
a1d206bfc3
commit
04cc8f7aa2
@ -45,6 +45,7 @@ define([
|
||||
|
||||
PlotOptionsController.prototype.updateDomainObject = function (domainObject) {
|
||||
this.domainObject = domainObject;
|
||||
this.$scope.formDomainObject = domainObject;
|
||||
};
|
||||
|
||||
PlotOptionsController.prototype.destroy = function () {
|
||||
@ -63,8 +64,7 @@ define([
|
||||
this.config = this.$scope.config = config;
|
||||
this.$scope.plotSeries = [];
|
||||
|
||||
this.domainObject = this.config.get('domainObject');
|
||||
this.$scope.formDomainObject = this.domainObject;
|
||||
this.updateDomainObject(this.config.get('domainObject'));
|
||||
this.unlisten = this.openmct.objects.observe(this.domainObject, '*', this.updateDomainObject.bind(this));
|
||||
|
||||
this.listenTo(this.$scope, '$destroy', this.destroy, this);
|
||||
|
Loading…
x
Reference in New Issue
Block a user