Merge branch 'topic-core-refactor' into tcr-master

This commit is contained in:
Andrew Henry 2019-12-11 14:52:11 -08:00
commit 98c9cc92b8
2 changed files with 7 additions and 20 deletions

View File

@ -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();
}
});

View File

@ -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);
};