Gallery not recovering from slow network bug fix
This commit is contained in:
parent
bebd42aa3a
commit
163121b22e
|
@ -20,7 +20,7 @@ const styles = theme => ({
|
||||||
marginLeft: 'auto',
|
marginLeft: 'auto',
|
||||||
backgroundImage: 'url(../images/galleryBackgroundImage.png)',
|
backgroundImage: 'url(../images/galleryBackgroundImage.png)',
|
||||||
overflow: 'hidden',
|
overflow: 'hidden',
|
||||||
minHeight: 300,
|
minHeight: 180,
|
||||||
minWidth: 300,
|
minWidth: 300,
|
||||||
width: 'auto',
|
width: 'auto',
|
||||||
height: 'auto',
|
height: 'auto',
|
||||||
|
@ -32,7 +32,7 @@ const styles = theme => ({
|
||||||
},
|
},
|
||||||
flamelinkGalleryInnerContainer: {
|
flamelinkGalleryInnerContainer: {
|
||||||
maxHeight: 1000,
|
maxHeight: 1000,
|
||||||
minHeight: 250,
|
minHeight: 180,
|
||||||
height: 'auto',
|
height: 'auto',
|
||||||
width: 'auto',
|
width: 'auto',
|
||||||
marginRight: 'auto',
|
marginRight: 'auto',
|
||||||
|
@ -58,10 +58,6 @@ class FlameLinkCollectionGallery extends Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
state = {
|
|
||||||
active: false,
|
|
||||||
}
|
|
||||||
|
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
|
@ -92,10 +88,6 @@ class FlameLinkCollectionGallery extends Component {
|
||||||
this.getPageTitle(this.props.galleryName);
|
this.getPageTitle(this.props.galleryName);
|
||||||
}
|
}
|
||||||
|
|
||||||
toggleClass = () => {
|
|
||||||
this.setState(state => ({ active: !state.active }));
|
|
||||||
}
|
|
||||||
|
|
||||||
getGalleryInfo(schemaDetails, schemaContent) {
|
getGalleryInfo(schemaDetails, schemaContent) {
|
||||||
var key;
|
var key;
|
||||||
var mediaNums = [];
|
var mediaNums = [];
|
||||||
|
@ -134,8 +126,8 @@ class FlameLinkCollectionGallery extends Component {
|
||||||
</Typography>
|
</Typography>
|
||||||
<Grid container className={classes.flamelinkGalleryContainer}>
|
<Grid container className={classes.flamelinkGalleryContainer}>
|
||||||
<Grid container className={classes.flamelinkGalleryInnerContainer}>
|
<Grid container className={classes.flamelinkGalleryInnerContainer}>
|
||||||
<Grid item lg={8} md={8} sm={12} xs={12} className={classes.flamelinkGallery} onClick={this.toggleClass}>
|
<Grid item lg={8} md={8} sm={12} xs={12} className={classes.flamelinkGallery}>
|
||||||
<div onClick={this.toggleClass}>
|
<div>
|
||||||
<RenderGallery key={Math.random()} />
|
<RenderGallery key={Math.random()} />
|
||||||
</div>
|
</div>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
|
@ -9,10 +9,9 @@ class RenderGallery extends Component {
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
showThumbnails: false,
|
showThumbnails: false,
|
||||||
showIndex: true,
|
|
||||||
showBullets: true,
|
|
||||||
mounted: false,
|
mounted: false,
|
||||||
autoPlay: true,
|
autoPlay: true,
|
||||||
|
slideInterval: 6000,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,10 +28,9 @@ class RenderGallery extends Component {
|
||||||
<ImageGallery
|
<ImageGallery
|
||||||
items={global.galleryImages}
|
items={global.galleryImages}
|
||||||
showThumbnails={this.state.showThumbnails}
|
showThumbnails={this.state.showThumbnails}
|
||||||
showIndex={this.state.showIndex}
|
|
||||||
showBullets={this.state.showBullets}
|
|
||||||
onImageLoad={this._onImageLoad}
|
onImageLoad={this._onImageLoad}
|
||||||
autoPlay={this.state.autoPlay}
|
autoPlay={this.state.autoPlay}
|
||||||
|
slideInterval={this.state.slideInterval}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue