1
+ /* ****************************************************************************
2
+ * Open MCT, Copyright (c) 2014-2016, United States Government
3
+ * as represented by the Administrator of the National Aeronautics and Space
4
+ * Administration. All rights reserved.
5
+ *
6
+ * Open MCT is licensed under the Apache License, Version 2.0 (the
7
+ * "License"); you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ * http://www.apache.org/licenses/LICENSE-2.0.
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations
15
+ * under the License.
16
+ *
17
+ * Open MCT includes source code licensed under additional open source
18
+ * licenses. See the Open Source Licenses file (LICENSES.md) included with
19
+ * this source code distribution or the Licensing information page available
20
+ * at runtime from the About dialog for additional information.
21
+ *****************************************************************************/
22
+
23
+ .l-toi-holder {
24
+ @include trans-prop-nice ($props : opacity , $dur : 200ms );
25
+ & :not (.pinned ) {
26
+ opacity : 0 ; // Hide by default, only show when user hovers over container that implements this element
27
+ }
28
+ .l-toi {
29
+
30
+ }
31
+ .l-toi-val {
32
+ color : $toiColorFg ;
33
+
34
+ }
35
+ }
36
+
37
+ // TOI in tables
38
+ .mct-table {
39
+ tr .l-toi-holder {
40
+ td .l-toi {
41
+ background-color : $toiColorBg ;
42
+ column-span : 999 ;
43
+ font-size : 0 ;
44
+ }
45
+ }
46
+ }
47
+
48
+ // TOI in plots
49
+ .gl-plot {
50
+ .gl-plot-wrapper-display-area-and-x-axis {
51
+ & :hover {
52
+ .l-toi-holder {
53
+ opacity : 1 ;
54
+ }
55
+ }
56
+ .l-toi-holder {
57
+ $toiColorBgPinned : rgba ($toiColorBgPinned , 0.4 );
58
+ pointer-events : none ;
59
+ position : absolute ;
60
+ top : 0 ;
61
+ bottom : nth ($plotDisplayArea , 3 ); // Position of element when TOI is pinned
62
+ min-width : 50px ;
63
+ max-width : 150px ;
64
+ width : 20% ; // Needs to be an even number to avoid sub-pixel antialiasing of the vertical line
65
+ & :before {
66
+ // Vertical line
67
+ border-left : 1px dashed $toiColorBg ;
68
+ content : ' ' ;
69
+ display : block ;
70
+ left : 50% ;
71
+ position : absolute ;
72
+ top : 0 ;
73
+ bottom : 0 ;
74
+ width : 1px ;
75
+ }
76
+ .l-toi-val {
77
+ background-color : $toiColorBg ;
78
+ box-sizing : border-box ;
79
+ padding : $interiorMarginSm $interiorMarginSm ;
80
+ position : absolute ;
81
+ text-align : center ;
82
+ width : 100% ;
83
+ bottom : -2px ;
84
+ border-radius : $controlCr ;
85
+ .val {
86
+ @include reverseEllipsis ();
87
+ }
88
+ .t-unpin-button {
89
+ margin-left : $interiorMarginSm ;
90
+ pointer-events : auto ;
91
+ }
92
+ }
93
+
94
+ & .pinned {
95
+ & :before {
96
+ border-left-color : $toiColorBgPinned ;
97
+ border-left-style : solid ;
98
+ }
99
+ .l-toi-val {
100
+ background-color : $toiColorBgPinned ;
101
+ border-radius : 0 ;
102
+ border-top-left-radius : $controlCr ;
103
+ border-top-right-radius : $controlCr ;
104
+ bottom : 0px ;
105
+ }
106
+ }
107
+
108
+ & :not (.pinned ) {
109
+ .l-toi-val {
110
+ @include transform (translateY (100% )); // Position of element when TOI is visible but not pinned
111
+ }
112
+ .t-unpin-button {
113
+ display : none ;
114
+ }
115
+ }
116
+ z-index : 3 ;
117
+ }
118
+ }
119
+ }
0 commit comments