mirror of
https://github.com/nasa/openmct.git
synced 2024-12-24 23:36:41 +00:00
[Plot] Update stacked plots immediately
When changes to pan-zoom bounds are made in one subplot, this will effect the pan-zoom bounds of other subplots. Ensure this occurs immediately. WTD-625.
This commit is contained in:
parent
9c1d72f917
commit
188e98a78b
@ -63,7 +63,7 @@
|
|||||||
<mct-chart draw="subplot.getDrawingObject()"
|
<mct-chart draw="subplot.getDrawingObject()"
|
||||||
ng-mousemove="subplot.hover($event)"
|
ng-mousemove="subplot.hover($event)"
|
||||||
ng-mousedown="subplot.startMarquee($event)"
|
ng-mousedown="subplot.startMarquee($event)"
|
||||||
ng-mouseup="subplot.endMarquee($event)">
|
ng-mouseup="subplot.endMarquee($event); plot.update()">
|
||||||
</mct-chart>
|
</mct-chart>
|
||||||
|
|
||||||
<!-- TODO: Move into correct position; make part of group; infer from set of actions -->
|
<!-- TODO: Move into correct position; make part of group; infer from set of actions -->
|
||||||
|
@ -90,6 +90,10 @@ define(
|
|||||||
modeOptions.getModeHandler().plotTelemetry(prepared);
|
modeOptions.getModeHandler().plotTelemetry(prepared);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function updateSubplot(subplot) {
|
||||||
|
subplot.update();
|
||||||
|
}
|
||||||
|
|
||||||
function setupModes(telemetryObjects) {
|
function setupModes(telemetryObjects) {
|
||||||
modeOptions = new PlotModeOptions(telemetryObjects || []);
|
modeOptions = new PlotModeOptions(telemetryObjects || []);
|
||||||
}
|
}
|
||||||
@ -159,6 +163,14 @@ define(
|
|||||||
*/
|
*/
|
||||||
getSubPlots: function () {
|
getSubPlots: function () {
|
||||||
return modeOptions.getModeHandler().getSubPlots();
|
return modeOptions.getModeHandler().getSubPlots();
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Explicitly update all plots.
|
||||||
|
*/
|
||||||
|
update: function () {
|
||||||
|
modeOptions.getModeHandler()
|
||||||
|
.getSubPlots()
|
||||||
|
.forEach(updateSubplot);
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -63,15 +63,13 @@ define(
|
|||||||
return {
|
return {
|
||||||
popPanZoom: popPanZoom,
|
popPanZoom: popPanZoom,
|
||||||
clearPanZoom: clearPanZoom,
|
clearPanZoom: clearPanZoom,
|
||||||
|
setBasePanZoom: setBasePanZoom,
|
||||||
getDepth: function () {
|
getDepth: function () {
|
||||||
return stacks.length > 0 ?
|
return stacks.length > 0 ?
|
||||||
stacks[0].getDepth() : 0;
|
stacks[0].getDepth() : 0;
|
||||||
},
|
},
|
||||||
getPanZoomStack: function (index) {
|
getPanZoomStack: function (index) {
|
||||||
return decoratedStacks[index];
|
return decoratedStacks[index];
|
||||||
},
|
|
||||||
getPanZoomStacks: function () {
|
|
||||||
return decoratedStacks;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -37,12 +37,10 @@ define(
|
|||||||
function plotTelemetry(prepared) {
|
function plotTelemetry(prepared) {
|
||||||
// Fit to the boundaries of the data, but don't
|
// Fit to the boundaries of the data, but don't
|
||||||
// override any user-initiated pan-zoom changes.
|
// override any user-initiated pan-zoom changes.
|
||||||
panZoomStackGroup.getPanZoomStacks().forEach(function (stack) {
|
panZoomStackGroup.setBasePanZoom(
|
||||||
stack.setBasePanZoom(
|
prepared.getOrigin(),
|
||||||
prepared.getOrigin(),
|
prepared.getDimensions()
|
||||||
prepared.getDimensions()
|
);
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
subplots.forEach(function (subplot, index) {
|
subplots.forEach(function (subplot, index) {
|
||||||
plotTelemetryTo(subplot, prepared, index);
|
plotTelemetryTo(subplot, prepared, index);
|
||||||
|
Loading…
Reference in New Issue
Block a user