mirror of
https://github.com/nasa/openmct.git
synced 2025-06-15 05:38:12 +00:00
[Code Style] Use prototypes in Plot bundle
WTD-1482.
This commit is contained in:
@ -35,28 +35,26 @@ define(
|
||||
* @constructor
|
||||
*/
|
||||
function SubPlotFactory(telemetryFormatter) {
|
||||
return {
|
||||
/**
|
||||
* Instantiate a new sub-plot.
|
||||
* @param {DomainObject[]} telemetryObjects the domain objects
|
||||
* which will be plotted in this sub-plot
|
||||
* @param {PlotPanZoomStack} panZoomStack the stack of pan-zoom
|
||||
* states which is applicable to this sub-plot
|
||||
* @returns {SubPlot} the instantiated sub-plot
|
||||
* @method
|
||||
* @memberof SubPlotFactory
|
||||
* @memberof platform/features/plot.SubPlotFactory#
|
||||
*/
|
||||
createSubPlot: function (telemetryObjects, panZoomStack) {
|
||||
return new SubPlot(
|
||||
telemetryObjects,
|
||||
panZoomStack,
|
||||
telemetryFormatter
|
||||
);
|
||||
}
|
||||
};
|
||||
this.telemetryFormatter = telemetryFormatter;
|
||||
}
|
||||
|
||||
/**
|
||||
* Instantiate a new sub-plot.
|
||||
* @param {DomainObject[]} telemetryObjects the domain objects
|
||||
* which will be plotted in this sub-plot
|
||||
* @param {PlotPanZoomStack} panZoomStack the stack of pan-zoom
|
||||
* states which is applicable to this sub-plot
|
||||
* @returns {SubPlot} the instantiated sub-plot
|
||||
* @method
|
||||
*/
|
||||
SubPlotFactory.prototype.createSubPlot = function (telemetryObjects, panZoomStack) {
|
||||
return new SubPlot(
|
||||
telemetryObjects,
|
||||
panZoomStack,
|
||||
this.telemetryFormatter
|
||||
);
|
||||
};
|
||||
|
||||
return SubPlotFactory;
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user