mirror of
https://github.com/nasa/openmct.git
synced 2025-02-13 22:22:38 +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 */
|
/* line 26, ../sass/inspector/_inspector.scss */
|
||||||
.plot-legend-item {
|
.plot-legend-item {
|
||||||
cursor: pointer; }
|
cursor: pointer; }
|
||||||
|
/* line 29, ../sass/inspector/_inspector.scss */
|
||||||
|
.plot-legend-item.inspected {
|
||||||
|
background-color: #005177; }
|
||||||
|
@ -25,4 +25,8 @@
|
|||||||
// Make plot legend items clickable
|
// Make plot legend items clickable
|
||||||
.plot-legend-item {
|
.plot-legend-item {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
|
&.inspected {
|
||||||
|
background-color: $colorKeySelectedBg;
|
||||||
|
}
|
||||||
}
|
}
|
@ -29,8 +29,8 @@
|
|||||||
<!-- ng-class is temporarily hard-coded in next element -->
|
<!-- ng-class is temporarily hard-coded in next element -->
|
||||||
<span class='plot-legend-item'
|
<span class='plot-legend-item'
|
||||||
ng-repeat="telemetryObject in subplot.getTelemetryObjects()"
|
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'
|
<span class='plot-color-swatch'
|
||||||
ng-style="{ 'background-color': plot.getColor($index) }">
|
ng-style="{ 'background-color': plot.getColor($index) }">
|
||||||
</span>
|
</span>
|
||||||
|
@ -165,6 +165,17 @@ define(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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.modeOptions = new PlotModeOptions([], subPlotFactory);
|
||||||
this.updateValues = updateValues;
|
this.updateValues = updateValues;
|
||||||
|
|
||||||
@ -179,7 +190,6 @@ define(
|
|||||||
|
|
||||||
// Unsubscribe when the plot is destroyed
|
// Unsubscribe when the plot is destroyed
|
||||||
$scope.$on("$destroy", releaseSubscription);
|
$scope.$on("$destroy", releaseSubscription);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user