22
22
23
23
.l-toi-holder {
24
24
@include trans-prop-nice ($props : opacity , $dur : 200ms );
25
- & :not (.active ) {
26
- opacity : 0 ; // Hide by default, only show when user hovers over container that implements this element
25
+ & :not (.pinned ) {
26
+ opacity : 0 ;
27
+ }
28
+ & .pinned {
29
+ opacity : 1 ;
27
30
}
28
31
.l-toi {
29
-
32
+ position : absolute ;
33
+ & .block {
34
+ $d : $toiW ;
35
+ background-color : $toiColorBg ;
36
+ border-radius : $controlCr ;
37
+ color : $toiColorFg ;
38
+ width : $d ;
39
+ height : $d ;
40
+ line-height : $d ;
41
+ text-align : center ;
42
+ & :hover {
43
+ background-color : $colorAlert !important ;
44
+ color : #fff !important ;
45
+ }
46
+ }
47
+ & :hover {
48
+ cursor : pointer !important ;
49
+ & :before {
50
+ // Icon, change to close box
51
+ content : $glyph-icon-x-in-circle !important ;
52
+ }
53
+ }
30
54
}
31
- .l-toi-val {
32
- color : $toiColorFg ;
33
-
55
+ & :hover {
56
+ $c : $toiColorBgHov ;
57
+ cursor : ew-resize ;
58
+ .l-toi.block {
59
+ background-color : $c !important ;
60
+ color : $toiColorFgHov ;
61
+ }
34
62
}
35
63
}
36
64
@@ -62,10 +90,10 @@ table {
62
90
}
63
91
& .l-toi.pinned {
64
92
td {
65
- border-top : 1px solid $toiColorBgPinned ;
93
+ border-top : 1px solid $toiColorBg ;
66
94
& :first-child :before {
67
95
@include toiIcon ();
68
- color : $toiColorBgPinned ;
96
+ color : $toiColorFg ;
69
97
}
70
98
}
71
99
& :hover {
@@ -82,20 +110,13 @@ table {
82
110
// TOI in plots
83
111
.gl-plot {
84
112
.gl-plot-wrapper-display-area-and-x-axis {
85
- & :hover {
86
- .l-toi-holder.hover {
87
- opacity : 1 ;
88
- }
89
- }
90
113
.l-toi-holder {
91
- $toiColorBgPinned : rgba ( $toiColorBgPinned , 0.4 );
92
- pointer-events : none ;
114
+ // @include test( );
115
+ @include transform ( translateX ( -50 % )) ;
93
116
position : absolute ;
94
117
top : 0 ;
95
- bottom : nth ($plotDisplayArea , 3 ); // Position of element when TOI is pinned
96
- min-width : 50px ;
97
- max-width : 150px ;
98
- width : 20% ; // Needs to be an even number to avoid sub-pixel antialiasing of the vertical line
118
+ bottom : nth ($plotDisplayArea , 3 );
119
+ width : $toiW ; // Needs to be an even number to avoid sub-pixel antialiasing of the vertical line
99
120
& :before {
100
121
// Vertical line
101
122
border-left : 1px dashed $toiColorBg ;
@@ -107,44 +128,15 @@ table {
107
128
bottom : 0 ;
108
129
width : 1px ;
109
130
}
110
- .l-toi-val {
111
- background-color : $toiColorBg ;
112
- box-sizing : border-box ;
113
- padding : $interiorMarginSm $interiorMarginSm ;
114
- position : absolute ;
115
- text-align : center ;
116
- width : 100% ;
117
- bottom : -2px ;
118
- border-radius : $controlCr ;
119
- .val {
120
- @include reverseEllipsis ();
121
- }
122
- .t-unpin-button {
123
- margin-left : $interiorMarginSm ;
124
- pointer-events : auto ;
125
- }
131
+ .l-toi {
132
+ @extend .icon-clock ;
133
+ @include transform (translateY (100% ));
134
+ bottom : 0 ;
126
135
}
127
-
128
- & .pinned {
136
+ & :hover {
137
+ background-color : rgba ( $toiColorBgHov , 0.1 );
129
138
& :before {
130
- border-left-color : $toiColorBgPinned ;
131
- border-left-style : solid ;
132
- }
133
- .l-toi-val {
134
- background-color : $toiColorBgPinned ;
135
- border-radius : 0 ;
136
- border-top-left-radius : $controlCr ;
137
- border-top-right-radius : $controlCr ;
138
- bottom : 0px ;
139
- }
140
- }
141
-
142
- & :not (.pinned ) {
143
- .l-toi-val {
144
- @include transform (translateY (100% )); // Position of element when TOI is visible but not pinned
145
- }
146
- .t-unpin-button {
147
- display : none ;
139
+ border-left-color : $toiColorBgHov !important ;
148
140
}
149
141
}
150
142
z-index : 3 ;
0 commit comments