diff options
Diffstat (limited to 'src/views/Gallery.js')
| -rw-r--r-- | src/views/Gallery.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/views/Gallery.js b/src/views/Gallery.js index ec1b234..e2652df 100644 --- a/src/views/Gallery.js +++ b/src/views/Gallery.js @@ -19,18 +19,18 @@ export default function Gallery({ images, visible }) { function previous() { setOpacity(0); - setTimeout(() => setIndex(Math.max(0, index - 1)), 100); + setTimeout(() => setIndex(mod(index - 1, images.length)), 200); // setTimeout(() => setOpacity(1), 500); } function next() { setOpacity(0); - setTimeout(() => setIndex(Math.min(images.length - 1, index + 1)), 100); + setTimeout(() => setIndex(mod(index + 1, images.length)), 200); // setTimeout(() => setOpacity(1), 500); } function nextOrWrap() { if (oneItem) return; setOpacity(0); - setTimeout(() => setIndex(mod(index + 1, images.length)), 100); + setTimeout(() => setIndex(mod(index + 1, images.length)), 200); // setTimeout(() => setOpacity(1), 500); } function appear() { |
