mirror of
https://github.com/nasa/openmct.git
synced 2025-06-12 20:28:14 +00:00
Merge remote-tracking branch 'origin/open1329' into open1343
This commit is contained in:
@ -52,6 +52,7 @@ define(
|
||||
origin = [0, 0],
|
||||
domainExtrema,
|
||||
rangeExtrema,
|
||||
buffers = {},
|
||||
bufferArray = [],
|
||||
domainOffset;
|
||||
|
||||
@ -63,11 +64,10 @@ define(
|
||||
// Check if this set of ids matches the current set of ids
|
||||
// (used to detect if line preparation can be skipped)
|
||||
function idsMatch(nextIds) {
|
||||
return nextIds.map(function (id, index) {
|
||||
return ids[index] === id;
|
||||
}).reduce(function (a, b) {
|
||||
return a && b;
|
||||
}, true);
|
||||
return ids.length === nextIds.length &&
|
||||
nextIds.every(function (id, index) {
|
||||
return ids[index] === id;
|
||||
});
|
||||
}
|
||||
|
||||
// Prepare plot lines for this group of telemetry objects
|
||||
@ -76,7 +76,7 @@ define(
|
||||
next = {};
|
||||
|
||||
// Detect if we already have everything we need prepared
|
||||
if (ids.length === nextIds.length && idsMatch(nextIds)) {
|
||||
if (idsMatch(nextIds)) {
|
||||
// Nothing to prepare, move on
|
||||
return;
|
||||
}
|
||||
@ -90,13 +90,13 @@ define(
|
||||
|
||||
// Create buffers for these objects
|
||||
bufferArray = ids.map(function (id) {
|
||||
var buffer = new PlotLineBuffer(
|
||||
domainOffset,
|
||||
INITIAL_SIZE,
|
||||
maxPoints
|
||||
);
|
||||
next[id] = lines[id] || new PlotLine(buffer);
|
||||
return buffer;
|
||||
buffers[id] = buffers[id] || new PlotLineBuffer(
|
||||
domainOffset,
|
||||
INITIAL_SIZE,
|
||||
maxPoints
|
||||
);
|
||||
next[id] = lines[id] || new PlotLine(buffers[id]);
|
||||
return buffers[id];
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user