mirror of
https://github.com/infeng/react-viewer.git
synced 2025-12-08 17:36:40 +00:00
fix can not change image when image is loading
This commit is contained in:
parent
cb72d8c13a
commit
3be7d94bfa
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user