mirror of
https://github.com/nasa/openmct.git
synced 2025-01-31 00:23:54 +00:00
Only listen on overlay plots
Only listen for mutations on overlay plots, as other mutations should be ignored by plot configuration. Fixes https://github.com/nasa/openmct/issues/1945
This commit is contained in:
parent
a958055f50
commit
7d8dc00996
@ -75,11 +75,14 @@ define([
|
|||||||
openmct: options.openmct
|
openmct: options.openmct
|
||||||
});
|
});
|
||||||
|
|
||||||
this.removeMutationListener = this.openmct.objects.observe(
|
if (this.get('domainObject').type === 'telemetry.plot.overlay') {
|
||||||
this.get('domainObject'),
|
this.removeMutationListener = this.openmct.objects.observe(
|
||||||
'*',
|
this.get('domainObject'),
|
||||||
this.updateDomainObject.bind(this)
|
'*',
|
||||||
);
|
this.updateDomainObject.bind(this)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
this.yAxis.listenToSeriesCollection(this.series);
|
this.yAxis.listenToSeriesCollection(this.series);
|
||||||
this.legend.listenToSeriesCollection(this.series);
|
this.legend.listenToSeriesCollection(this.series);
|
||||||
|
|
||||||
@ -112,7 +115,9 @@ define([
|
|||||||
this.yAxis.destroy();
|
this.yAxis.destroy();
|
||||||
this.series.destroy();
|
this.series.destroy();
|
||||||
this.legend.destroy();
|
this.legend.destroy();
|
||||||
this.removeMutationListener();
|
if (this.removeMutationListener) {
|
||||||
|
this.removeMutationListener();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Return defaults, which are extracted from the passed in domain
|
* Return defaults, which are extracted from the passed in domain
|
||||||
|
Loading…
x
Reference in New Issue
Block a user