Skip to content

Commit a2d0658

Browse files
committed
Merge pull request #216 from nasa/open-vista54a
Review and integrate open-vista54a into master
2 parents 74f289c + 5d5425d commit a2d0658

File tree

5 files changed

+216
-220
lines changed

5 files changed

+216
-220
lines changed

example/generator/src/SinewaveLimitCapability.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,25 +30,25 @@ define(
3030
YELLOW = 0.5,
3131
LIMITS = {
3232
rh: {
33-
cssClass: "s-limit-upr-red",
33+
cssClass: "s-limit-upr s-limit-red",
3434
low: RED,
3535
high: Number.POSITIVE_INFINITY,
3636
name: "Red High"
3737
},
3838
rl: {
39-
cssClass: "s-limit-lwr-red",
39+
cssClass: "s-limit-lwr s-limit-red",
4040
high: -RED,
4141
low: Number.NEGATIVE_INFINITY,
4242
name: "Red Low"
4343
},
4444
yh: {
45-
cssClass: "s-limit-upr-yellow",
45+
cssClass: "s-limit-upr s-limit-yellow",
4646
low: YELLOW,
4747
high: RED,
4848
name: "Yellow High"
4949
},
5050
yl: {
51-
cssClass: "s-limit-lwr-yellow",
51+
cssClass: "s-limit-lwr s-limit-yellow",
5252
low: -RED,
5353
high: -YELLOW,
5454
name: "Yellow Low"

platform/commonUI/general/res/sass/_constants.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,8 @@ $dirImgs: $dirCommonRes + 'images/';
106106

107107
/************************** TIMINGS */
108108
$controlFadeMs: 100ms;
109+
110+
/************************** LIMITS */
111+
$glyphLimit: '\e603';
112+
$glyphLimitUpr: '\0000eb';
113+
$glyphLimitLwr: '\0000ee';
Lines changed: 35 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,39 @@
1-
@mixin limit($bg, $ic, $glyph) {
2-
background: $bg !important;
3-
//color: $fg !important;
4-
&:before {
5-
//@include pulse(1000ms);
6-
color: $ic;
7-
content: $glyph;
8-
}
1+
@mixin limitGlyph($iconColor, $glyph: $glyphLimit) {
2+
&:before {
3+
color: $iconColor;
4+
content: $glyph;
5+
font-family: symbolsfont;
6+
font-size: 0.8em;
7+
display: inline;
8+
margin-right: $interiorMarginSm;
9+
}
10+
911
}
1012

11-
[class*="s-limit"] {
12-
//white-space: nowrap;
13-
&:before {
14-
display: inline-block;
15-
font-family: symbolsfont;
16-
font-size: 0.75em;
17-
font-style: normal !important;
18-
margin-right: $interiorMarginSm;
19-
vertical-align: middle;
20-
}
13+
.s-limit-red { background: $colorLimitRedBg !important; }
14+
.s-limit-yellow { background: $colorLimitYellowBg !important; }
15+
16+
// Handle limit when applied to a tr
17+
tr[class*="s-limit"] {
18+
&.s-limit-red td:first-child {
19+
@include limitGlyph($colorLimitRedIc);
20+
}
21+
&.s-limit-yellow td:first-child {
22+
@include limitGlyph($colorLimitYellowIc);
23+
}
24+
&.s-limit-upr td:first-child:before { content:$glyphLimitUpr; }
25+
&.s-limit-lwr td:first-child:before { content:$glyphLimitLwr; }
2126
}
2227

23-
.s-limit-upr-red { @include limit($colorLimitRedBg, $colorLimitRedIc, "\0000eb"); };
24-
.s-limit-upr-yellow { @include limit($colorLimitYellowBg, $colorLimitYellowIc, "\0000ed"); };
25-
.s-limit-lwr-yellow { @include limit($colorLimitYellowBg, $colorLimitYellowIc, "\0000ec"); };
26-
.s-limit-lwr-red { @include limit($colorLimitRedBg, $colorLimitRedIc, "\0000ee"); };
28+
// Handle limit when applied directly to a non-tr element
29+
// Assume this is applied to the element that displays the limit value
30+
:not(tr)[class*="s-limit"] {
31+
&.s-limit-red {
32+
@include limitGlyph($colorLimitRedIc);
33+
}
34+
&.s-limit-yellow {
35+
@include limitGlyph($colorLimitYellowIc);
36+
}
37+
&.s-limit-upr:before { content:$glyphLimitUpr; }
38+
&.s-limit-lwr:before { content:$glyphLimitLwr; }
39+
}

0 commit comments

Comments
 (0)