[Plot] Get/set from overlay switcher

Get/set mode from the plot mode switcher; only show
the switcher if there is more than one mode available
(which should only occur when there is more than one
telemetry object in the plot.) WTD-625.
This commit is contained in:
Victor Woeltjen
2014-12-10 18:38:42 -08:00
parent 3a0e80d360
commit 01f1a92d09
3 changed files with 23 additions and 5 deletions

View File

@ -18,15 +18,19 @@ define(
function PlotModeOptions(telemetryObjects) {
var options = telemetryObjects.length > 1 ?
[ STACKED, OVERLAID ] : [ OVERLAID, STACKED ];
[ OVERLAID, STACKED ] : [ OVERLAID ],
mode = options[0];
return {
getModeOptions: function () {
return options;
},
getMode: function (option) {
getMode: function () {
return mode;
},
setMode: function (option) {
mode = option;
}
};
}