Conditionals fixes and tweaks

- Legacy wrapper fixes to allow color styling to be applied as expected;
- New `$mainViewPad` constant;
- Fix `c-control-bar` element spacing in plots;
- TODO: check for regressions, particularly with plot views;
- Fixes #2772: better `is-style-invisible` css for `c-style-thumbs`;
This commit is contained in:
charlesh88 2020-03-24 23:45:25 -07:00
parent cdf0dd0c10
commit 07d101ac1c
8 changed files with 77 additions and 54 deletions

View File

@ -21,7 +21,8 @@
*****************************************************************************/ *****************************************************************************/
<template> <template>
<table class="c-table c-lad-table"> <div class="c-lad-table-wrapper">
<table class="c-table c-lad-table">
<thead> <thead>
<tr> <tr>
<th>Name</th> <th>Name</th>
@ -36,7 +37,8 @@
:domain-object="item.domainObject" :domain-object="item.domainObject"
/> />
</tbody> </tbody>
</table> </table>
</div>
</template> </template>
<script> <script>

View File

@ -94,6 +94,8 @@
&.c-style-thumb { &.c-style-thumb {
display: block !important; display: block !important;
background-color: transparent !important;
border-color: transparent !important;
@include bgCheckerboard($size: 10px, $imp: true); @include bgCheckerboard($size: 10px, $imp: true);
opacity: 1; opacity: 1;
} }

View File

@ -19,8 +19,8 @@
this source code distribution or the Licensing information page available this source code distribution or the Licensing information page available
at runtime from the About dialog for additional information. at runtime from the About dialog for additional information.
--> -->
<span ng-controller="PlotController as controller" <div ng-controller="PlotController as controller"
class="abs holder holder-plot has-control-bar"> class="c-plot holder holder-plot has-control-bar">
<div class="c-control-bar" ng-show="!controller.hideExportButtons"> <div class="c-control-bar" ng-show="!controller.hideExportButtons">
<span class="c-button-set c-button-set--strip-h"> <span class="c-button-set c-button-set--strip-h">
<button class="c-button icon-download" <button class="c-button icon-download"
@ -50,4 +50,4 @@
the-x-axis="xAxis"> the-x-axis="xAxis">
</mct-plot> </mct-plot>
</div> </div>
</span> </div>

View File

@ -19,8 +19,8 @@
this source code distribution or the Licensing information page available this source code distribution or the Licensing information page available
at runtime from the About dialog for additional information. at runtime from the About dialog for additional information.
--> -->
<span ng-controller="StackedPlotController as stackedPlot" <div ng-controller="StackedPlotController as stackedPlot"
class="abs holder holder-plot has-control-bar t-plot-stacked"> class="c-plot c-plot--stacked holder holder-plot has-control-bar">
<div class="l-control-bar" ng-show="!stackedPlot.hideExportButtons"> <div class="l-control-bar" ng-show="!stackedPlot.hideExportButtons">
<span class="c-button-set c-button-set--strip-h"> <span class="c-button-set c-button-set--strip-h">
<button class="c-button icon-download" <button class="c-button icon-download"
@ -57,4 +57,4 @@
<mct-overlay-plot domain-object="telemetryObject"></mct-overlay-plot> <mct-overlay-plot domain-object="telemetryObject"></mct-overlay-plot>
</div> </div>
</div> </div>
</span> </div>

View File

@ -44,6 +44,7 @@ $overlayOuterMarginLg: 5%;
$overlayOuterMarginFullscreen: 0%; $overlayOuterMarginFullscreen: 0%;
$overlayOuterMarginDialog: 20%; $overlayOuterMarginDialog: 20%;
$overlayInnerMargin: 25px; $overlayInnerMargin: 25px;
$mainViewPad: 2px;
/*************** Items */ /*************** Items */
$itemPadLR: 5px; $itemPadLR: 5px;
$gridItemDesk: 175px; $gridItemDesk: 175px;

View File

@ -25,7 +25,27 @@ mct-plot {
} }
/*********************** STACKED PLOT LAYOUT */ /*********************** STACKED PLOT LAYOUT */
.t-plot-stacked { .is-editing {
.gl-plot.child-frame {
&:hover {
background: rgba($editUIColorBg, 0.1);
box-shadow: inset rgba($editUIColorBg, 0.8) 0 0 0 1px;
}
&[s-selected] {
border: 1px solid $editUIColorFg !important;
color: $editUIColorFg !important;
box-shadow: $editFrameSelectedShdw;
z-index: 2;
}
}
}
.c-plot {
$p: $mainViewPad;
position: absolute;
top: $p; right: $p; bottom: $p; left: $p;
&--stacked {
.l-view-section { .l-view-section {
// Make this a flex container // Make this a flex container
display: flex; display: flex;
@ -49,28 +69,13 @@ mct-plot {
display: block; display: block;
} }
} }
}
.is-editing {
.gl-plot.child-frame {
&:hover {
background: rgba($editUIColorBg, 0.1);
box-shadow: inset rgba($editUIColorBg, 0.8) 0 0 0 1px;
} }
&[s-selected] {
border: 1px solid $editUIColorFg !important;
color: $editUIColorFg !important;
box-shadow: $editFrameSelectedShdw;
z-index: 2;
}
}
} }
.gl-plot { .gl-plot {
color: $colorPlotFg;
display: flex; display: flex;
//font-size: 0.7rem;
position: relative; position: relative;
width: 100%; width: 100%;
height: 100%; height: 100%;
@ -146,10 +151,10 @@ mct-plot {
} }
.gl-plot-coords { .gl-plot-coords {
// This does not appear to be in use in Open MCT
box-sizing: border-box; box-sizing: border-box;
border-radius: $controlCr; border-radius: $controlCr;
background: black; background: black;
color: lighten($colorBodyFg, 30%);
padding: 2px 5px; padding: 2px 5px;
position: absolute; position: absolute;
top: nth($plotDisplayArea,1) + $interiorMarginLg; top: nth($plotDisplayArea,1) + $interiorMarginLg;
@ -164,7 +169,6 @@ mct-plot {
.gl-plot-label, .gl-plot-label,
.l-plot-label { .l-plot-label {
color: $colorPlotLabelFg;
position: absolute; position: absolute;
text-align: center; text-align: center;

View File

@ -32,6 +32,10 @@
display: flex; display: flex;
align-items: center; align-items: center;
> * + * {
margin-left: $interiorMarginSm;
}
&__label { &__label {
display: inline-block; display: inline-block;
white-space: nowrap; white-space: nowrap;

View File

@ -78,10 +78,14 @@ div.c-table {
.c-table-wrapper { .c-table-wrapper {
// Wraps .c-control-bar and .c-table // Wraps .c-control-bar and .c-table
@include abs();
overflow: hidden;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
overflow: hidden;
// Using absolute here because sizing table can't calc width properly if padding is used
$p: $mainViewPad;
position: absolute;
top: $p; right: $p; bottom: $p; left: $p;
> .c-table { > .c-table {
height: auto; height: auto;
@ -158,6 +162,12 @@ div.c-table {
} }
} }
.c-lad-table-wrapper {
width: 100%;
height: 100%;
padding: $mainViewPad;
}
.c-lad-table { .c-lad-table {
th, td { th, td {
width: 33%; // Needed to prevent size jumping as values dynamically update width: 33%; // Needed to prevent size jumping as values dynamically update