mirror of
https://github.com/nasa/openmct.git
synced 2025-06-13 04:38:15 +00:00
[Plot] Fill in specs
Fill in specs for elements used by the PlotController in order to improve coverage of the plot bundle. WTD-533.
This commit is contained in:
@ -17,23 +17,18 @@ define(
|
||||
min = [Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY],
|
||||
x,
|
||||
y,
|
||||
xLabels = {},
|
||||
yLabels = {},
|
||||
yUnits = {},
|
||||
domainOffset = Number.POSITIVE_INFINITY,
|
||||
buffers;
|
||||
|
||||
datas = datas || [];
|
||||
// Remove any undefined data sets
|
||||
datas = (datas || []).filter(identity);
|
||||
|
||||
datas.filter(identity).forEach(function (data) {
|
||||
// Filter out un
|
||||
datas.forEach(function (data) {
|
||||
domainOffset = Math.min(data.getDomainValue(0, domain), domainOffset);
|
||||
});
|
||||
|
||||
datas.forEach(function (data, i) {
|
||||
if (!data) {
|
||||
return; // skip null data
|
||||
}
|
||||
|
||||
vertices.push([]);
|
||||
for (index = 0; index < data.getPointCount(); index = index + 1) {
|
||||
x = data.getDomainValue(index, domain);
|
||||
@ -45,18 +40,6 @@ define(
|
||||
max[0] = Math.max(max[0], x);
|
||||
max[1] = Math.max(max[1], y);
|
||||
}
|
||||
|
||||
if (data.getDomainLabel) {
|
||||
xLabels[data.getDomainLabel(domain)] = true;
|
||||
}
|
||||
|
||||
if (data.getRangeLabel) {
|
||||
yLabels[data.getRangeLabel(range)] = true;
|
||||
}
|
||||
|
||||
if (data.getRangeUnits) {
|
||||
yUnits[data.getRangeUnits(range)] = true;
|
||||
}
|
||||
});
|
||||
|
||||
if (max[1] === min[1]) {
|
||||
@ -64,10 +47,6 @@ define(
|
||||
min[1] = min[1] - 1.0;
|
||||
}
|
||||
|
||||
xLabels = Object.keys(xLabels).sort();
|
||||
yLabels = Object.keys(yLabels).sort();
|
||||
yUnits = Object.keys(yUnits).sort();
|
||||
|
||||
buffers = vertices.map(function (v) { return new Float32Array(v); });
|
||||
|
||||
return {
|
||||
|
Reference in New Issue
Block a user