File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -337,6 +337,14 @@ html, body {
337
337
width : 50px ;
338
338
text-align : center;
339
339
padding : 4px 0 ;
340
+ margin-left : -10px ;
341
+ -webkit-transition : opacity .25s ease-out, margin .25s ease-out;
342
+ transition : opacity .25s ease-out, margin .25s ease-out;
343
+ }
344
+
345
+ # timestamp-tooltip .active {
346
+ margin-left : 0 ;
347
+ opacity : 1 ;
340
348
}
341
349
342
350
# timestamp-tooltip : after {
Original file line number Diff line number Diff line change @@ -90,28 +90,30 @@ define([], function() {
90
90
} ;
91
91
92
92
Chat . prototype . _handleMouseLeave = function ( event ) {
93
- this . timestampEl . style . opacity = 0 ;
93
+ this . timestampEl . className = '' ;
94
94
} ;
95
95
96
96
Chat . prototype . _handleMouseOver = function ( event ) {
97
97
var timestamp = event . target . dataset . timestamp || event . target . parentElement . dataset . timestamp ,
98
98
chatMessageEl = ( event . target . dataset . timestamp ) ? event . target : event . target . parentElement ;
99
99
100
100
if ( timestamp ) {
101
- this . timestampEl . style . opacity = 1 ;
101
+ if ( this . timestampEl . className === '' ) {
102
+ this . timestampEl . className = 'active' ;
103
+ }
102
104
this . timestampEl . innerHTML = timestamp ;
103
105
104
106
var timestampTop = chatMessageEl . offsetTop - this . chatLogEl . scrollTop - 3 ,
105
107
timestampLeft = chatMessageEl . offsetLeft - 50 ;
106
108
107
109
if ( timestampTop < this . chatLogEl . offsetTop - 10 ) {
108
- this . timestampEl . style . opacity = 0 ;
110
+ this . timestampEl . className = '' ;
109
111
} else {
110
112
this . timestampEl . style . top = chatMessageEl . offsetTop - this . chatLogEl . scrollTop - 3 + 'px' ;
111
113
this . timestampEl . style . left = chatMessageEl . offsetLeft - 50 + 'px' ;
112
114
}
113
115
} else {
114
- this . timestampEl . style . opacity = 0 ;
116
+ this . timestampEl . className = '' ;
115
117
}
116
118
} ;
117
119
You can’t perform that action at this time.
0 commit comments