mirror of
https://github.com/nasa/openmct.git
synced 2025-06-15 13:48:12 +00:00
Added status support to plots
This commit is contained in:
@ -35,6 +35,7 @@ define(
|
|||||||
|
|
||||||
this.boundsListener = this.boundsListener.bind(this);
|
this.boundsListener = this.boundsListener.bind(this);
|
||||||
this.timeSystemListener = this.timeSystemListener.bind(this);
|
this.timeSystemListener = this.timeSystemListener.bind(this);
|
||||||
|
this.followListener = this.followListener.bind(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
ConductorRepresenter.prototype.boundsListener = function (bounds) {
|
ConductorRepresenter.prototype.boundsListener = function (bounds) {
|
||||||
@ -51,7 +52,11 @@ define(
|
|||||||
start: bounds.start,
|
start: bounds.start,
|
||||||
end: bounds.end,
|
end: bounds.end,
|
||||||
domain: timeSystem.metadata.key
|
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
|
// Handle a specific representation of a specific domain object
|
||||||
@ -61,6 +66,7 @@ define(
|
|||||||
|
|
||||||
this.conductor.on("bounds", this.boundsListener);
|
this.conductor.on("bounds", this.boundsListener);
|
||||||
this.conductor.on("timeSystem", this.timeSystemListener);
|
this.conductor.on("timeSystem", this.timeSystemListener);
|
||||||
|
this.conductor.on("follow", this.followListener)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@
|
|||||||
ng-mousemove="subplot.hover($event)"
|
ng-mousemove="subplot.hover($event)"
|
||||||
mct-drag="subplot.continueDrag($event)"
|
mct-drag="subplot.continueDrag($event)"
|
||||||
mct-drag-down="subplot.startDrag($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>
|
</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 -->
|
||||||
<div class="l-local-controls gl-plot-local-controls t-plot-display-controls"
|
<div class="l-local-controls gl-plot-local-controls t-plot-display-controls"
|
||||||
|
@ -239,6 +239,7 @@ define(
|
|||||||
setBasePanZoom(bounds);
|
setBasePanZoom(bounds);
|
||||||
requery();
|
requery();
|
||||||
}
|
}
|
||||||
|
self.updateStatus($scope.domainObject, follow);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.modeOptions = new PlotModeOptions([], subPlotFactory);
|
this.modeOptions = new PlotModeOptions([], subPlotFactory);
|
||||||
@ -369,6 +370,12 @@ define(
|
|||||||
return this.pending;
|
return this.pending;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
PlotController.prototype.updateStatus = function (domainObject, follow) {
|
||||||
|
if (domainObject.hasCapability('status')) {
|
||||||
|
domainObject.getCapability('status').set('timeconductor-unsynced', follow && this.isZoomed());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
return PlotController;
|
return PlotController;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user