[Frontend] Styling for TOI element

Fixes #933
Fixes #1193
Tabular styling for TOI;
This commit is contained in:
Charles Hacskaylo 2016-10-04 15:49:18 -07:00
parent 1650aae518
commit 0ed0a48a8c
6 changed files with 23 additions and 49 deletions

View File

@ -20,21 +20,6 @@
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/*
Plots
-toi-holder:before vertical line
-toi: glyphs
Tables
tr: border color
td:before: glyphs
TC
-toi-holder:before, after: vertical lines
-toi: glyphs
*/
.l-toi-holder, .l-toi-holder,
.l-toi-holder:after, .l-toi-holder:after,
.l-toi-holder:before, .l-toi-holder:before,
@ -44,7 +29,6 @@ TC
position: absolute; position: absolute;
} }
.l-toi-holder { .l-toi-holder {
$p: 3px; $p: 3px;
@include transform(translateX(-50%)); @include transform(translateX(-50%));
@ -52,14 +36,16 @@ TC
position: absolute; position: absolute;
top: 0; top: 0;
bottom: 0; bottom: 0;
width: $toiW; // Needs to be an even number to avoid sub-pixel antialiasing of the vertical line width: $toiW;
&:not(.pinned) { &:not(.pinned) {
opacity: 0; opacity: 0;
pointer-events: none; pointer-events: none;
} }
&.pinned { &.pinned {
opacity: 1; opacity: 1;
} }
&:before, &:before,
&:after { &:after {
// Vertical lines. TC uses both; plot only uses :before // Vertical lines. TC uses both; plot only uses :before
@ -73,6 +59,7 @@ TC
bottom: 0; bottom: 0;
width: 2px; width: 2px;
} }
.l-toi { .l-toi {
// Holds clock icon an unpin button // Holds clock icon an unpin button
font-size: $toiW; font-size: $toiW;
@ -91,12 +78,13 @@ TC
.l-toi-val { .l-toi-val {
$tbP: 1px; $tbP: 1px;
background-color: $toiColorBg; //rgba($toiColorBg, 0.8); background-color: $toiColorBg;
border-radius: $controlCr; border-radius: $controlCr;
box-sizing: content-box; box-sizing: content-box;
display: inline-block; display: inline-block;
color: $toiColorFg; color: $toiColorFg;
font-size: 0.7rem; font-size: 0.7rem;
font-weight: 400;
height: $toiW; height: $toiW;
right: $toiW + $interiorMarginSm; right: $toiW + $interiorMarginSm;
top: 50%; top: 50%;
@ -120,38 +108,28 @@ table {
tbody, .tbody { tbody, .tbody {
tr, .tr { tr, .tr {
&.l-toi.pinned { &.l-toi.pinned {
td {
border-top: 1px dashed $toiColorBg; border-top: 1px dashed $toiColorBg;
td, .td {
&:first-child:before { &:first-child:before {
@extend .ui-symbol; @extend .icon-clock;
@include transform(translate(-50%, -50%)); @include transform(translate(-50%, -50%));
content: $glyph-icon-clock; color: $toiColorBg;
cursor: pointer;
display: block; display: block;
position: absolute; position: absolute;
text-shadow: 0 1px 15px black;
left: 50%; left: 50%;
bottom: auto;
text-shadow: 0 1px 15px black;
top: 0; top: 0;
z-index: 2; z-index: 2;
color: $toiColorBg;
}
}
&.highlight-bottom-edge {
td {
border-bottom: 1px dashed $toiColorBg;
//border-top: 1px solid transparent;
&:first-child:before {
@include transform(translate(-50%, 50%));
top: auto;
bottom: 0;
}
} }
} }
&:hover { &:hover {
td:first-child:before { td, .td {
content: $glyph-icon-x-in-circle; &:first-child:before {
cursor: pointer; content: $glyph-icon-x-in-circle !important;
}
} }
} }
} }
@ -164,6 +142,7 @@ table {
.gl-plot-wrapper-display-area-and-x-axis { .gl-plot-wrapper-display-area-and-x-axis {
.l-toi-holder { .l-toi-holder {
bottom: nth($plotDisplayArea, 3) - $interiorMargin; bottom: nth($plotDisplayArea, 3) - $interiorMargin;
z-index: 3;
&:after { &:after {
display: none; display: none;
} }
@ -172,8 +151,6 @@ table {
@include transform(translateY(100%)); @include transform(translateY(100%));
bottom: 0; bottom: 0;
} }
z-index: 3;
} }
} }
} }

View File

@ -58,6 +58,7 @@ table {
}*/ }*/
} }
tr, .tr { tr, .tr {
border-top: 1px solid $colorTabBorder;
display: table-row; display: table-row;
&:first-child .td { &:first-child .td {
border-top: none; border-top: none;
@ -99,7 +100,6 @@ table {
} }
} }
td, .td { td, .td {
border-top: 1px solid $colorTabBorder;
min-width: 20px; min-width: 20px;
color: $colorTelemFresh; color: $colorTelemFresh;
padding: $tabularTdPadTB $tabularTdPadLR; padding: $tabularTdPadTB $tabularTdPadLR;

View File

@ -104,9 +104,9 @@ $colorInspectorSectionHeaderBg: $colorFormSectionHeader;
$colorInspectorSectionHeaderFg: pullForward($colorInspectorBg, 40%); $colorInspectorSectionHeaderFg: pullForward($colorInspectorBg, 40%);
// Time of Interest // Time of Interest
$toiColorBg: #6b93c6; //$colorBtnMajorBg; $toiColorBg: #6b93c6;
$toiColorFg: #000; $toiColorFg: #000;
$toiW: 12px; $toiW: 12px; // Needs to be an even number to avoid sub-pixel antialiasing of the vertical line
// Status colors, mainly used for messaging and item ancillary symbols // Status colors, mainly used for messaging and item ancillary symbols
$colorStatusFg: #ccc; $colorStatusFg: #ccc;

View File

@ -106,7 +106,7 @@ $colorInspectorSectionHeaderFg: pullForward($colorInspectorBg, 40%);
// Time of Interest // Time of Interest
$toiColorBg: #6b93c6; $toiColorBg: #6b93c6;
$toiColorFg: #fff; $toiColorFg: #fff;
$toiW: 12px; $toiW: 12px; // Needs to be an even number to avoid sub-pixel antialiasing of the vertical line
// Status colors, mainly used for messaging and item ancillary symbols // Status colors, mainly used for messaging and item ancillary symbols
$colorStatusFg: #fff; $colorStatusFg: #fff;

View File

@ -244,9 +244,6 @@
left: nth($timeCondAxisLROffset, 1); left: nth($timeCondAxisLROffset, 1);
right: nth($timeCondAxisLROffset, 2); right: nth($timeCondAxisLROffset, 2);
&:hover { &:hover {
// Hide the cursor, because the TOI element essentially "becomes" the cursor
// when the user is hovering over the visualization area.
cursor: none;
.l-toi-holder.hover { .l-toi-holder.hover {
opacity: 1; opacity: 1;
} }

View File

@ -50,7 +50,7 @@
</thead> </thead>
<tbody> <tbody>
<tr ng-repeat="visibleRow in visibleRows track by visibleRow.rowIndex" <tr ng-repeat="visibleRow in visibleRows track by visibleRow.rowIndex"
ng-class="{ 'l-toi active pinned': false }" ng-class="{ 'l-toi pinned': false }"
ng-style="{ ng-style="{
top: visibleRow.offsetY + 'px', top: visibleRow.offsetY + 'px',
}"> }">