viewerjs icon indicating copy to clipboard operation
viewerjs copied to clipboard

When a picture fails to load, viewer is not work forever

Open dohkoxiaozu opened this issue 2 years ago • 5 comments

https://github.com/fengyuanchen/viewerjs/blob/465111e66e489cf3a68028fbb9a4da98a65c92de/src/js/methods.js#L1176

dohkoxiaozu avatar Mar 30 '22 12:03 dohkoxiaozu

When a picture fails to load, if the next picture can be loaded normally, the code will not pass here. That is to say, after a picture fails to load, all pictures will not be displayed whether they are normal or not

dohkoxiaozu avatar Mar 30 '22 12:03 dohkoxiaozu

Can you provide an online demo for debugging?

fengyuanchen avatar Apr 05 '22 08:04 fengyuanchen

I have this issue running the viewer inline mode. I have to destroy and recreate the viewer to make it work for another image again

jildertvenema avatar May 12 '22 09:05 jildertvenema

https://codesandbox.io/s/amazing-jackson-n1ig1v?file=/src/index.js

Here is a demo

jildertvenema avatar May 12 '22 09:05 jildertvenema

Fixed it by adding: viewer.view();

jildertvenema avatar May 13 '22 09:05 jildertvenema