mirror of
https://github.com/nasa/openmct.git
synced 2025-02-05 10:39:15 +00:00
[Plot] Highlight inspected plot legend items
Plot legend items that are being selected for inspection are now highligted.
This commit is contained in:
parent
bcf6bbf627
commit
1dd3d5214d
@ -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; }
|
||||
|
@ -25,4 +25,8 @@
|
||||
// Make plot legend items clickable
|
||||
.plot-legend-item {
|
||||
cursor: pointer;
|
||||
|
||||
&.inspected {
|
||||
background-color: $colorKeySelectedBg;
|
||||
}
|
||||
}
|
@ -29,8 +29,8 @@
|
||||
<!-- ng-class is temporarily hard-coded in next element -->
|
||||
<span class='plot-legend-item'
|
||||
ng-repeat="telemetryObject in subplot.getTelemetryObjects()"
|
||||
ng-class="plot.getLegendClass(telemetryObject)"
|
||||
ng-click="ngModel.inspectionObjects[0] = telemetryObject">
|
||||
ng-click="ngModel.inspectionObjects[0] = telemetryObject"
|
||||
ng-class="[plot.getLegendClass(telemetryObject), plot.getInspectedClass(telemetryObject)]">
|
||||
<span class='plot-color-swatch'
|
||||
ng-style="{ 'background-color': plot.getColor($index) }">
|
||||
</span>
|
||||
|
@ -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);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user