From c0230e38a20ca1d60840ce9ba116d5938f14c2f0 Mon Sep 17 00:00:00 2001 From: Scott Worley Date: Fri, 28 Feb 2014 00:52:02 -0800 Subject: [PATCH] move_to_nondeleted() calls setpic() --- picsorter.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/picsorter.js b/picsorter.js index ae4c837..d721ac4 100644 --- a/picsorter.js +++ b/picsorter.js @@ -12,7 +12,6 @@ localStorage.picsorter_picinfo = JSON.stringify(picinfo); var exposure = 20; var zoom = "sm/"; var input_index = -1; -move_to_nondeleted(1); function setpic() { @@ -43,6 +42,7 @@ function move_to_nondeleted(direction) { input_index += direction; } while (picinfo[files[input_index]].deleted); say(input_index); + setpic(); } function mark_deleted() { @@ -58,13 +58,13 @@ function mark_not_deleted() { } $(function() { - setpic(); + move_to_nondeleted(1); }); Mousetrap.bind('z', toggle_zoom); Mousetrap.bind('Z', function() { $("#pic").toggleClass("fit_view"); }); -Mousetrap.bind('n', function() { move_to_nondeleted(1); setpic(); }); -Mousetrap.bind('p', function() { move_to_nondeleted(-1); setpic(); }); +Mousetrap.bind('n', function() { move_to_nondeleted(1); }); +Mousetrap.bind('p', function() { move_to_nondeleted(-1); }); Mousetrap.bind('N', function() { input_index ++; say(input_index); setpic(); }); Mousetrap.bind('P', function() { input_index --; say(input_index); setpic(); }); Mousetrap.bind('b', function() { exposure ++; say_exposure(); setpic(); }); -- 2.44.1