mirror of
https://github.com/nasa/openmct.git
synced 2024-12-20 05:37:53 +00:00
[Plot] Allow lookup of alternate ranges
This commit is contained in:
parent
ae7a1618e8
commit
a88fadcb49
@ -287,9 +287,12 @@ define(
|
||||
* @param {DomainObject} domainObject the object of interest
|
||||
* @returns the most recent domain value observed
|
||||
*/
|
||||
TelemetrySubscription.prototype.getDomainValue = function (domainObject) {
|
||||
var id = domainObject.getId();
|
||||
return (this.latestValues[id] || {}).domain;
|
||||
TelemetrySubscription.prototype.getDomainValue = function (domainObject, key) {
|
||||
var id = domainObject.getId(),
|
||||
latestValue = this.latestValues[id];
|
||||
return latestValue && (key ?
|
||||
latestValue.datum[key] :
|
||||
latestValue.domain);
|
||||
};
|
||||
|
||||
/**
|
||||
@ -304,9 +307,12 @@ define(
|
||||
* @param {DomainObject} domainObject the object of interest
|
||||
* @returns the most recent range value observed
|
||||
*/
|
||||
TelemetrySubscription.prototype.getRangeValue = function (domainObject) {
|
||||
var id = domainObject.getId();
|
||||
return (this.latestValues[id] || {}).range;
|
||||
TelemetrySubscription.prototype.getRangeValue = function (domainObject, key) {
|
||||
var id = domainObject.getId(),
|
||||
latestValue = this.latestValues[id];
|
||||
return latestValue && (key ?
|
||||
latestValue.datum[key] :
|
||||
latestValue.range);
|
||||
};
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user