mirror of
https://github.com/nasa/openmct.git
synced 2025-01-18 02:39:56 +00:00
Merge pull request #1369 from nasa/datum-fallback
Use series.getDatum when available
This commit is contained in:
commit
df2ce72e39
@ -122,9 +122,12 @@ define(
|
||||
*/
|
||||
self.getDatum = function (telemetryObject, index) {
|
||||
function makeNewDatum(series) {
|
||||
return series ?
|
||||
subscription.makeDatum(telemetryObject, series, index) :
|
||||
undefined;
|
||||
if (series) {
|
||||
if (series.getDatum) {
|
||||
return series.getDatum(index);
|
||||
}
|
||||
return subscription.makeDatum(telemetryObject, series, index);
|
||||
}
|
||||
}
|
||||
|
||||
return typeof index !== 'number' ?
|
||||
|
@ -45,6 +45,9 @@ define([
|
||||
};
|
||||
|
||||
function createDatum(domainObject, metadata, legacySeries, i) {
|
||||
if (legacySeries.getDatum) {
|
||||
return legacySeries.getDatum(i);
|
||||
}
|
||||
var datum = {};
|
||||
|
||||
metadata.domains.reduce(function (d, domain) {
|
||||
|
Loading…
Reference in New Issue
Block a user