diff --git a/README.md b/README.md index 3cef262..71b8989 100644 --- a/README.md +++ b/README.md @@ -46,10 +46,10 @@ Keyboard shortcuts: |---|---| | LEFT | Previous image | RIGHT | Next image -| UP | Previous image (of previous row in tiled view) -| DOWN | Next image (of next row in tiled view) +| UP | Previous image, or previous row in tile mode +| DOWN | Next image, or next row in tile mode | ENTER | Expand image -| BACKSPACE | Back to tiled view +| BACKSPACE | Back to tile mode | SPACE | Next image | ESC | Escape from full screen, or back to tile mode | `F` | Mode: Full screen diff --git a/webize b/webize index 4a0ba71..f2b92b6 100755 --- a/webize +++ b/webize @@ -578,7 +578,8 @@ cat - >> "$indexHtm" <<'EOF' var setPreviousImageAsActiveImage = function() { if (activeImageIndex <= 0) { - setActiveImageIndex(0, true); + // Go to end + setActiveImageIndex(images.length - 1, true); }else { var imageholder = images[activeImageIndex].parentNode; var idx = Array.from(imageholder.parentNode.children).indexOf(imageholder); // Wrapper @@ -589,7 +590,8 @@ cat - >> "$indexHtm" <<'EOF' var setNextImageAsActiveImage = function() { if (activeImageIndex >= images.length - 1) { - setActiveImageIndex(images.length - 1, true); + // Go to start + setActiveImageIndex(0, true); }else { var imageholder = images[activeImageIndex].parentNode; var idx = Array.from(imageholder.parentNode.children).indexOf(imageholder); // Wrapper