mirror of
https://github.com/karl0ss/ai_image_frame_server.git
synced 2025-06-08 19:35:07 +01:00
allow navigation in lightbox over all images
This commit is contained in:
parent
9ce6ff25ea
commit
336c03a888
@ -286,8 +286,17 @@
|
|||||||
|
|
||||||
function nextImage() {
|
function nextImage() {
|
||||||
const images = getGalleryImages();
|
const images = getGalleryImages();
|
||||||
currentIndex = (currentIndex + 1) % images.length;
|
if (currentIndex + 1 >= images.length && loadedCount < allImages.length) {
|
||||||
showImageAndLoadDetails(currentIndex);
|
loadNextBatch();
|
||||||
|
// Wait briefly to ensure DOM updates
|
||||||
|
setTimeout(() => {
|
||||||
|
currentIndex++;
|
||||||
|
showImageAndLoadDetails(currentIndex);
|
||||||
|
}, 100);
|
||||||
|
} else {
|
||||||
|
currentIndex = (currentIndex + 1) % images.length;
|
||||||
|
showImageAndLoadDetails(currentIndex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function prevImage() {
|
function prevImage() {
|
||||||
@ -296,6 +305,7 @@
|
|||||||
showImageAndLoadDetails(currentIndex);
|
showImageAndLoadDetails(currentIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function closeLightbox() {
|
function closeLightbox() {
|
||||||
document.getElementById("lightbox").style.display = "none";
|
document.getElementById("lightbox").style.display = "none";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user