fix can not change image when image is loading

This commit is contained in:
infeng 2016-10-22 15:35:15 +08:00
parent cb72d8c13a
commit 3be7d94bfa

View File

@ -144,6 +144,11 @@ export default class ViewerCore extends React.Component<ViewerProps, ViewerCoreS
scaleY: 1,
loading: true,
});
}else {
this.setState({
activeIndex: activeIndex,
loading: true,
});
}
img.onload = () => {
let imgWidth = img.width;