From 4fe40ec442c82c5a9a411626965a60fc6137b44f Mon Sep 17 00:00:00 2001 From: Brandon Cooper Date: Thu, 10 Dec 2020 15:59:00 -0800 Subject: [PATCH] loadImage when going back and forth with arrows --- src/image-viewer.component.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/image-viewer.component.tsx b/src/image-viewer.component.tsx index 848eb7b1..b65b02f8 100644 --- a/src/image-viewer.component.tsx +++ b/src/image-viewer.component.tsx @@ -311,7 +311,7 @@ export default class ImageViewer extends React.Component { }).start(); const nextIndex = (this.state.currentShowIndex || 0) - 1; - + this.loadImage(nextIndex); this.setState( { currentShowIndex: nextIndex @@ -345,7 +345,7 @@ export default class ImageViewer extends React.Component { }).start(); const nextIndex = (this.state.currentShowIndex || 0) + 1; - + this.loadImage(nextIndex); this.setState( { currentShowIndex: nextIndex