From: Scott Worley Date: Fri, 28 Feb 2014 08:52:02 +0000 (-0800) Subject: move_to_nondeleted() calls setpic() X-Git-Url: http://git.scottworley.com/picsort/commitdiff_plain/c0230e38a20ca1d60840ce9ba116d5938f14c2f0?ds=inline move_to_nondeleted() calls setpic() --- 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(); });