From 3eaeb4edb303705864251da6d5d07d26e96f5b89 Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Sat, 20 Aug 2016 21:01:41 +0300 Subject: [PATCH] media browser: prev/next arrows are no longer reversed --- motioneye/static/js/main.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/motioneye/static/js/main.js b/motioneye/static/js/main.js index 2615682..205019a 100644 --- a/motioneye/static/js/main.js +++ b/motioneye/static/js/main.js @@ -3054,8 +3054,8 @@ function runPictureDialog(entries, pos, mediaType) { img.height(height); } updateModalDialogPosition(); - prevArrow.css('display', pos > 0 ? '' : 'none'); - nextArrow.css('display', pos < entries.length - 1 ? '' : 'none'); + prevArrow.css('display', pos < entries.length - 1 ? '' : 'none'); + nextArrow.css('display', pos > 0 ? '' : 'none'); progressImg.remove(); }); @@ -3064,16 +3064,16 @@ function runPictureDialog(entries, pos, mediaType) { } prevArrow.click(function () { - if (pos > 0) { - pos--; + if (pos < entries.length - 1) { + pos++; } updatePicture(); }); nextArrow.click(function () { - if (pos < entries.length - 1) { - pos++; + if (pos > 0) { + pos--; } updatePicture(); -- 2.39.5