mirror of
https://github.com/nasa/openmct.git
synced 2025-06-16 06:08:11 +00:00
[Plot] Initially establish bounds
Initially establish domain bounds with time controller, WTD-1515
This commit is contained in:
@ -92,6 +92,8 @@ define(
|
|||||||
conductorScope.$watch('conductor.outer[1]', updateConductorOuter);
|
conductorScope.$watch('conductor.outer[1]', updateConductorOuter);
|
||||||
conductorScope.$watch('conductor.inner[0]', updateConductorInner);
|
conductorScope.$watch('conductor.inner[0]', updateConductorInner);
|
||||||
conductorScope.$watch('conductor.inner[1]', updateConductorInner);
|
conductorScope.$watch('conductor.inner[1]', updateConductorInner);
|
||||||
|
|
||||||
|
repScope.$on('telemetry:view', updateConductorInner);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle a specific representation of a specific domain object
|
// Handle a specific representation of a specific domain object
|
||||||
|
@ -95,6 +95,17 @@ define(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Change the displayable bounds
|
||||||
|
function setBasePanZoom(unused, bounds) {
|
||||||
|
var start = bounds.start,
|
||||||
|
end = bounds.end;
|
||||||
|
if (updater) {
|
||||||
|
updater.setDomainBounds(start, end);
|
||||||
|
self.update();
|
||||||
|
}
|
||||||
|
lastBounds = bounds;
|
||||||
|
}
|
||||||
|
|
||||||
// Reinstantiate the plot updater (e.g. because we have a
|
// Reinstantiate the plot updater (e.g. because we have a
|
||||||
// new subscription.) This will clear the plot.
|
// new subscription.) This will clear the plot.
|
||||||
function recreateUpdater() {
|
function recreateUpdater() {
|
||||||
@ -108,6 +119,10 @@ define(
|
|||||||
handle,
|
handle,
|
||||||
($scope.axes[1].active || {}).key
|
($scope.axes[1].active || {}).key
|
||||||
);
|
);
|
||||||
|
// Keep any externally-provided bounds
|
||||||
|
if (lastBounds) {
|
||||||
|
setBasePanZoom({}, lastBounds);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle new telemetry data in this plot
|
// Handle new telemetry data in this plot
|
||||||
@ -139,17 +154,6 @@ define(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Change the displayable bounds
|
|
||||||
function setBasePanZoom(unused, bounds) {
|
|
||||||
var start = bounds.start,
|
|
||||||
end = bounds.end;
|
|
||||||
if (updater) {
|
|
||||||
updater.setDomainBounds(start, end);
|
|
||||||
self.update();
|
|
||||||
}
|
|
||||||
lastBounds = bounds;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create a new subscription; telemetrySubscriber gets
|
// Create a new subscription; telemetrySubscriber gets
|
||||||
// to do the meaningful work here.
|
// to do the meaningful work here.
|
||||||
function subscribe(domainObject) {
|
function subscribe(domainObject) {
|
||||||
@ -182,10 +186,6 @@ define(
|
|||||||
if (handle) {
|
if (handle) {
|
||||||
recreateUpdater();
|
recreateUpdater();
|
||||||
requestTelemetry();
|
requestTelemetry();
|
||||||
// Keep any externally-provided bounds
|
|
||||||
if (lastBounds) {
|
|
||||||
setBasePanZoom({}, lastBounds);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -210,6 +210,8 @@ define(
|
|||||||
// Unsubscribe when the plot is destroyed
|
// Unsubscribe when the plot is destroyed
|
||||||
$scope.$on("$destroy", releaseSubscription);
|
$scope.$on("$destroy", releaseSubscription);
|
||||||
|
|
||||||
|
// Notify any external observers that a new telemetry view is here
|
||||||
|
$scope.$emit("telemetry:view");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -307,7 +307,8 @@ define(
|
|||||||
|
|
||||||
// Suppress follow behavior if we have windowed in on the past
|
// Suppress follow behavior if we have windowed in on the past
|
||||||
this.hasSpecificDomainBounds = true;
|
this.hasSpecificDomainBounds = true;
|
||||||
this.following = end >= this.domainExtrema[1];
|
this.following =
|
||||||
|
!this.domainExtrema || (end >= this.domainExtrema[1]);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user