diff --git a/platform/commonUI/general/res/css/theme-espresso.css b/platform/commonUI/general/res/css/theme-espresso.css index c16dfb5fef..cba9b40604 100644 --- a/platform/commonUI/general/res/css/theme-espresso.css +++ b/platform/commonUI/general/res/css/theme-espresso.css @@ -5376,3 +5376,6 @@ input[type="text"] { /* line 26, ../sass/inspector/_inspector.scss */ .plot-legend-item { cursor: pointer; } + /* line 29, ../sass/inspector/_inspector.scss */ + .plot-legend-item.inspected { + background-color: #005177; } diff --git a/platform/commonUI/general/res/sass/inspector/_inspector.scss b/platform/commonUI/general/res/sass/inspector/_inspector.scss index 48a4421185..1e7a6efb84 100644 --- a/platform/commonUI/general/res/sass/inspector/_inspector.scss +++ b/platform/commonUI/general/res/sass/inspector/_inspector.scss @@ -25,4 +25,8 @@ // Make plot legend items clickable .plot-legend-item { cursor: pointer; + + &.inspected { + background-color: $colorKeySelectedBg; + } } \ No newline at end of file diff --git a/platform/features/plot/res/templates/plot.html b/platform/features/plot/res/templates/plot.html index 8b66277ea6..84fdebdcde 100644 --- a/platform/features/plot/res/templates/plot.html +++ b/platform/features/plot/res/templates/plot.html @@ -29,8 +29,8 @@ + ng-click="ngModel.inspectionObjects[0] = telemetryObject" + ng-class="[plot.getLegendClass(telemetryObject), plot.getInspectedClass(telemetryObject)]"> diff --git a/platform/features/plot/src/PlotController.js b/platform/features/plot/src/PlotController.js index a54fff83dd..03038ea31e 100644 --- a/platform/features/plot/src/PlotController.js +++ b/platform/features/plot/src/PlotController.js @@ -164,7 +164,18 @@ define( handle = undefined; } } - + + // Determines if the legend item is being inspected. If so, the class + // is 'inspected' + function getInspectedClass(telemetryObject) { + if ($scope.ngModel && + $scope.ngModel.inspectionObjects && + $scope.ngModel.inspectionObjects[0] === telemetryObject) { + return "inspected"; + } + } + this.getInspectedClass = getInspectedClass; + this.modeOptions = new PlotModeOptions([], subPlotFactory); this.updateValues = updateValues; @@ -179,7 +190,6 @@ define( // Unsubscribe when the plot is destroyed $scope.$on("$destroy", releaseSubscription); - } /**