mirror of
https://github.com/nasa/openmct.git
synced 2025-02-21 01:42:31 +00:00
[Plot] Prevent duplicate query on bounds change
Bounds change triggers a clearing of plot history, which triggers a user interaction change, which was triggering a second query. This change sets a flag to prevent the requery from the user interaction on bounds change. This flag could potentially be reused elsewhere, e.g. if we wanted to prevent requery when not utilizing a minmax data source. fixes #2126
This commit is contained in:
parent
15a75ac134
commit
ef9c6d5fed
@ -181,7 +181,9 @@ define([
|
||||
};
|
||||
this.config.xAxis.set('range', newRange);
|
||||
if (!isTick) {
|
||||
this.skipReloadOnInteraction = true;
|
||||
this.$scope.$broadcast('plot:clearHistory');
|
||||
this.skipReloadOnInteraction = false;
|
||||
this.loadMoreData(newRange, true);
|
||||
} else {
|
||||
// Drop any data that is more than 1x (max-min) before min.
|
||||
@ -234,7 +236,9 @@ define([
|
||||
var xDisplayRange = this.config.xAxis.get('displayRange');
|
||||
var xRange = this.config.xAxis.get('range');
|
||||
|
||||
this.loadMoreData(xDisplayRange);
|
||||
if (!this.skipReloadOnInteraction) {
|
||||
this.loadMoreData(xDisplayRange);
|
||||
}
|
||||
|
||||
this.synchronized(xRange.min === xDisplayRange.min &&
|
||||
xRange.max === xDisplayRange.max);
|
||||
|
Loading…
x
Reference in New Issue
Block a user