File tree Expand file tree Collapse file tree 3 files changed +37
-1
lines changed
Expand file tree Collapse file tree 3 files changed +37
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
33
44import raf from 'raf' ;
55import tween from './tween.js'
6+ import Loading from './Loading'
67
78/**
89 *
@@ -467,7 +468,7 @@ class ImageContainer extends PureComponent {
467468 onTouchEnd = { this . handleTouchEnd }
468469 style = { defaultStyle } >
469470 {
470- isLoaded ? < img src = { src } style = { ImageStyle } /> : ''
471+ isLoaded ? < img src = { src } style = { ImageStyle } /> : < Loading />
471472 }
472473 </ div >
473474 ) ;
Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+
3+ const Loading = ( props ) => {
4+ return (
5+ < div className = "viewer-image-loading" >
6+ </ div >
7+ ) ;
8+ } ;
9+
10+ export default Loading ;
Original file line number Diff line number Diff line change 5555 }
5656 }
5757 }
58+ .viewer-image-loading {
59+ position : absolute ;
60+ margin : auto ;
61+ left : 0 ;
62+ right : 0 ;
63+ top : 0 ;
64+ bottom : 0 ;
65+ width : 32px ;
66+ height : 32px ;
67+ box-sizing : border-box ;
68+ border-radius : 100% ;
69+ border-width : 4px ;
70+ border-style : solid ;
71+ border-color : #333 ;
72+ border-bottom-color : #FFF ;
73+ animation : roll 1s linear infinite ;
74+ }
75+ @keyframes roll{
76+ from{
77+ transform : rotate (0deg );
78+ }
79+ to{
80+ transform : rotate (360deg );
81+ }
82+ }
5883}
You can’t perform that action at this time.
0 commit comments