mirror of
https://github.com/nasa/openmct.git
synced 2025-02-21 01:42:31 +00:00
Added status support to plots
This commit is contained in:
parent
a4f6f6f50b
commit
1b7fc57d21
@ -35,6 +35,7 @@ define(
|
||||
|
||||
this.boundsListener = this.boundsListener.bind(this);
|
||||
this.timeSystemListener = this.timeSystemListener.bind(this);
|
||||
this.followListener = this.followListener.bind(this);
|
||||
}
|
||||
|
||||
ConductorRepresenter.prototype.boundsListener = function (bounds) {
|
||||
@ -51,7 +52,11 @@ define(
|
||||
start: bounds.start,
|
||||
end: bounds.end,
|
||||
domain: timeSystem.metadata.key
|
||||
});
|
||||
}, this.conductor.follow());
|
||||
};
|
||||
|
||||
ConductorRepresenter.prototype.followListener = function () {
|
||||
this.boundsListener(this.conductor.bounds());
|
||||
};
|
||||
|
||||
// Handle a specific representation of a specific domain object
|
||||
@ -61,6 +66,7 @@ define(
|
||||
|
||||
this.conductor.on("bounds", this.boundsListener);
|
||||
this.conductor.on("timeSystem", this.timeSystemListener);
|
||||
this.conductor.on("follow", this.followListener)
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -82,7 +82,7 @@
|
||||
ng-mousemove="subplot.hover($event)"
|
||||
mct-drag="subplot.continueDrag($event)"
|
||||
mct-drag-down="subplot.startDrag($event)"
|
||||
mct-drag-up="subplot.endDrag($event); plot.update()">
|
||||
mct-drag-up="subplot.endDrag($event); plot.update();">
|
||||
</mct-chart>
|
||||
<!-- TODO: Move into correct position; make part of group; infer from set of actions -->
|
||||
<div class="l-local-controls gl-plot-local-controls t-plot-display-controls"
|
||||
|
@ -239,6 +239,7 @@ define(
|
||||
setBasePanZoom(bounds);
|
||||
requery();
|
||||
}
|
||||
self.updateStatus($scope.domainObject, follow);
|
||||
}
|
||||
|
||||
this.modeOptions = new PlotModeOptions([], subPlotFactory);
|
||||
@ -369,6 +370,12 @@ define(
|
||||
return this.pending;
|
||||
};
|
||||
|
||||
PlotController.prototype.updateStatus = function (domainObject, follow) {
|
||||
if (domainObject.hasCapability('status')) {
|
||||
domainObject.getCapability('status').set('timeconductor-unsynced', follow && this.isZoomed());
|
||||
}
|
||||
};
|
||||
|
||||
return PlotController;
|
||||
}
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user