File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 12
12
.photo .blurb {
13
13
position : absolute;
14
14
background-color : # d8d8d8 ;
15
- opacity : 0.8 ;
15
+ opacity : 0 ;
16
16
padding : 10px 5px ;
17
17
overflow-y : scroll;
18
18
overflow-x : hidden;
Original file line number Diff line number Diff line change @@ -23,6 +23,11 @@ const Photo = React.createClass({
23
23
renderOverlay ( ) {
24
24
const { title, description, margin} = this . props ;
25
25
26
+ // Display empty div for initial transition
27
+ if ( ! this . img ) {
28
+ return ( < div className = "blurb" style = { { opacity : 0 } } /> ) ;
29
+ }
30
+
26
31
// Retrieve position from element
27
32
const rect = this . img . getBoundingClientRect ( ) ;
28
33
const top = rect . top ;
@@ -55,7 +60,7 @@ const Photo = React.createClass({
55
60
...( height ? { height} : null ) ,
56
61
...( margin ? { margin : margin + 'px' } : null ) ,
57
62
} } />
58
- { clickable && this . img && this . renderOverlay ( ) }
63
+ { clickable && this . renderOverlay ( ) }
59
64
</ div >
60
65
) ;
61
66
} ,
You can’t perform that action at this time.
0 commit comments