mirror of
https://github.com/nasa/openmct.git
synced 2025-06-14 05:08:15 +00:00
[Plot] Spec for PlotController
Fill in spec for PlotController, which is the primary handler of logic associated with plot views, transitioned for WTD-533.
This commit is contained in:
@ -84,13 +84,26 @@ define(
|
||||
tickGenerator.generateRangeTicks(RANGE_TICKS);
|
||||
}
|
||||
|
||||
function plotTelemetry(telemetry) {
|
||||
var prepared, data;
|
||||
function setupAxes(metadatas) {
|
||||
$scope.axes = [
|
||||
new PlotAxis("domain", metadatas, AXIS_DEFAULTS[0]),
|
||||
new PlotAxis("range", metadatas, AXIS_DEFAULTS[1])
|
||||
];
|
||||
}
|
||||
|
||||
function plotTelemetry() {
|
||||
var prepared, data, telemetry;
|
||||
|
||||
telemetry = $scope.telemetry;
|
||||
|
||||
if (!telemetry) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!$scope.axes) {
|
||||
setupAxes(telemetry.getMetadata());
|
||||
}
|
||||
|
||||
data = telemetry.getResponse();
|
||||
|
||||
prepared = new PlotPreparer(
|
||||
@ -119,13 +132,6 @@ define(
|
||||
updateTicks();
|
||||
}
|
||||
|
||||
function setupAxes(metadatas) {
|
||||
$scope.axes = [
|
||||
new PlotAxis("domain", metadatas, AXIS_DEFAULTS[0]),
|
||||
new PlotAxis("range", metadatas, AXIS_DEFAULTS[1])
|
||||
];
|
||||
}
|
||||
|
||||
function toMousePosition($event) {
|
||||
var target = $event.target,
|
||||
bounds = target.getBoundingClientRect();
|
||||
|
Reference in New Issue
Block a user