global clear works on plots
This commit is contained in:
@@ -377,6 +377,19 @@ 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();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -80,6 +80,10 @@ define([
|
||||
'configuration.filters',
|
||||
this.updateFiltersAndResubscribe.bind(this)
|
||||
);
|
||||
|
||||
this.refresh = this.refresh.bind(this);
|
||||
|
||||
this.openmct.notifications.on('clear', this.refresh);
|
||||
}
|
||||
|
||||
eventHelpers.extend(PlotController.prototype);
|
||||
@@ -166,6 +170,8 @@ define([
|
||||
if (this.filterObserver) {
|
||||
this.filterObserver();
|
||||
}
|
||||
|
||||
this.openmct.notifications.off('clear', this.refresh);
|
||||
};
|
||||
|
||||
PlotController.prototype.loadMoreData = function (range, purge) {
|
||||
@@ -263,6 +269,12 @@ define([
|
||||
});
|
||||
};
|
||||
|
||||
PlotController.prototype.refresh = function (updatedFilters) {
|
||||
this.config.series.forEach(function (series) {
|
||||
series.refresh();
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Export view as JPG.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user