mirror of
https://github.com/nasa/openmct.git
synced 2025-02-21 09:52:04 +00:00
Merge branch 'topic-core-refactor' into tcr-master
This commit is contained in:
commit
98c9cc92b8
@ -140,9 +140,14 @@ define([
|
||||
* @returns {Promise}
|
||||
*/
|
||||
fetch: function (options) {
|
||||
const strategy = options && options.shouldNotUseMinMax ? undefined : 'minMax';
|
||||
let strategy;
|
||||
|
||||
if (this.model.interpolate !== 'none') {
|
||||
strategy = 'minMax';
|
||||
}
|
||||
|
||||
options = _.extend({}, { size: 1000, strategy, filters: this.filters }, options || {});
|
||||
|
||||
if (!this.unsubscribe) {
|
||||
this.unsubscribe = this.openmct
|
||||
.telemetry
|
||||
@ -379,19 +384,6 @@ define([
|
||||
delete this.unsubscribe;
|
||||
}
|
||||
this.fetch();
|
||||
},
|
||||
|
||||
/**
|
||||
* Clears the plot series, unsubscribes and resubscribes
|
||||
* @public
|
||||
*/
|
||||
refresh: function () {
|
||||
this.reset();
|
||||
if (this.unsubscribe) {
|
||||
this.unsubscribe();
|
||||
delete this.unsubscribe;
|
||||
}
|
||||
this.fetch();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -102,8 +102,7 @@ define([
|
||||
this.startLoading();
|
||||
var options = {
|
||||
size: this.$element[0].offsetWidth,
|
||||
domain: this.config.xAxis.get('key'),
|
||||
shouldNotUseMinMax: this.shouldNotUseMinMax(series)
|
||||
domain: this.config.xAxis.get('key')
|
||||
};
|
||||
|
||||
series.load(options)
|
||||
@ -161,10 +160,6 @@ define([
|
||||
return config;
|
||||
};
|
||||
|
||||
PlotController.prototype.shouldNotUseMinMax = function (series) {
|
||||
return series.model.interpolate === 'none';
|
||||
};
|
||||
|
||||
PlotController.prototype.onTimeSystemChange = function (timeSystem) {
|
||||
this.config.xAxis.set('key', timeSystem.key);
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user