maybe fix
This commit is contained in:
parent
98481820f9
commit
a496e5ad2c
@ -85,7 +85,7 @@ class Main extends Component {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (this.state.photos.length > 3){
|
if (this.state.photos.length > 3){
|
||||||
for(let i=this.state.currentImage - 1; i<=this.state.currentImage + 1; i++){
|
for(let i=this.state.currentImage-1; i<=this.state.currentImage+1; i++){
|
||||||
let j = i;
|
let j = i;
|
||||||
if(j < 0){
|
if(j < 0){
|
||||||
j += this.state.photos.length;
|
j += this.state.photos.length;
|
||||||
@ -94,12 +94,15 @@ class Main extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let carousel = <Carousel views={photos_carousel} currentIndex={0} trackProps={{onViewChange: (v) => this.onViewChange(v)}}/>
|
||||||
|
carousel.setState({currentIndex: 1})
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<ModalGateway>
|
<ModalGateway>
|
||||||
{this.state.photoIsOpen &&
|
{this.state.photoIsOpen &&
|
||||||
<Modal onClose={this.togglePhoto}>
|
<Modal onClose={this.togglePhoto}>
|
||||||
<Carousel views={photos_carousel} currentIndex={1} trackProps={{onViewChange: (v) => this.onViewChange(v)}}/>
|
{carousel}
|
||||||
</Modal>
|
</Modal>
|
||||||
}
|
}
|
||||||
</ModalGateway>
|
</ModalGateway>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user