[Time Controller] Get conductor working with fixed pos.

WTD-1515
This commit is contained in:
Victor Woeltjen
2015-09-09 16:46:00 -07:00
parent 0d710209b1
commit a4dda695dd
3 changed files with 31 additions and 8 deletions

View File

@ -44,18 +44,35 @@ define(
this.wrappedCapability = telemetryCapability;
}
ConductorTelemetryCapability.prototype.amendRequest = function (request) {
request = request || {};
// This isn't really the right check, but it happens to distinguish
// plots (which want to query for the full set of data for easy
// panning) from views like fixed position, which only want the
// single latest data point.
if (request.size !== undefined) {
request.start = this.timeConductor.displayStart();
request.end = this.timeConductor.displayEnd();
} else {
request.start = this.timeConductor.queryStart();
request.end = this.timeConductor.queryEnd();
}
return request;
};
ConductorTelemetryCapability.prototype.getMetadata = function () {
return this.wrappedCapability.getMetadata();
};
ConductorTelemetryCapability.prototype.requestData = function (request) {
request = request || {};
request.start = this.timeConductor.queryStart();
request.end = this.timeConductor.queryEnd();
request = this.amendRequest(request);
return this.wrappedCapability.requestData(request);
};
ConductorTelemetryCapability.prototype.subscribe = function (callback, request) {
request = this.amendRequest(request);
return this.wrappedCapability.subscribe(callback, request);
};

View File

@ -120,7 +120,7 @@ define(
handle.getDatum(telemetryObject);
if (telemetryObject &&
handle.getDomainValue(telemetryObject) < maxDomainValue) {
(handle.getDomainValue(telemetryObject) < maxDomainValue)) {
setDisplayedValue(
telemetryObject,
handle.getRangeValue(telemetryObject),
@ -233,7 +233,7 @@ define(
}
// Trigger a new query for telemetry data
function updateDisplayBounds(bounds) {
function updateDisplayBounds(event, bounds) {
maxDomainValue = bounds.end;
if (handle) {
handle.request(