Merge pull request #1369 from nasa/datum-fallback

Use series.getDatum when available
This commit is contained in:
Andrew Henry 2017-01-18 21:37:31 -08:00 committed by GitHub
commit df2ce72e39
2 changed files with 9 additions and 3 deletions

View File

@ -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' ?

View File

@ -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) {