From b08b596b34a9f84248df294c7ee4f0c953e000a2 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 16 Sep 2021 18:44:16 +0200 Subject: 3d clocks --- src/views/Gallery.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/views/Gallery.js') 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() { -- cgit v1.2.3-70-g09d2