[Plot] Only highlight legend if multiple

Legend items will only be highlighted when
selected for inspection if there are more
than one legend item in the plot.
This commit is contained in:
slhale 2015-08-28 16:22:07 -07:00
parent 15152d26f8
commit cebdf24666

View File

@ -166,11 +166,12 @@ define(
}
// Determines if the legend item is being inspected. If so, the class
// is 'inspected'
// is 'inspected' -- unless that is the only legend item for the plot
function getInspectedClass(telemetryObject) {
if ($scope.ngModel &&
$scope.ngModel.inspectionObjects &&
$scope.ngModel.inspectionObjects.indexOf(telemetryObject) !== -1) {
$scope.ngModel.inspectionObjects.indexOf(telemetryObject) !== -1 &&
self.modeOptions.getModeHandler().getSubPlots()[0].telemetryObjects.length > 1) {
return "inspected";
}
}