summaryrefslogtreecommitdiff
path: root/src/views/Gallery.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2021-09-16 18:44:16 +0200
committerJules Laplace <julescarbon@gmail.com>2021-09-16 18:44:16 +0200
commitb08b596b34a9f84248df294c7ee4f0c953e000a2 (patch)
tree1504bb96fcbf558d08e4d457a8078c7ca7654afe /src/views/Gallery.js
parentb6d86f71169ef1643a3a44527ae8f59d10ec78b3 (diff)
3d clocks
Diffstat (limited to 'src/views/Gallery.js')
-rw-r--r--src/views/Gallery.js6
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() {