From ca26d0d738c3eaa798f3fd53e75756910328fc37 Mon Sep 17 00:00:00 2001 From: Scott Worley Date: Fri, 28 Feb 2014 00:00:20 -0800 Subject: [PATCH] Add exposure level chattiness --- picsorter.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/picsorter.js b/picsorter.js index 22d6f10..d3f50cc 100644 --- a/picsorter.js +++ b/picsorter.js @@ -18,6 +18,11 @@ function say(message) { setTimeout(function() { $("#message").addClass("fade"); }, 1); } +function say_exposure() { + var e = (exposure / 4) - 3.5; + say((e >= 0 ? "+" : "") + e); +} + function toggle_zoom() { if (zoom) { zoom = ""; @@ -56,7 +61,7 @@ Mousetrap.bind('n', function() { move_to_nondeleted(1); setpic(); }); Mousetrap.bind('p', function() { move_to_nondeleted(-1); setpic(); }); 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 ++; setpic(); }); -Mousetrap.bind('d', function() { exposure --; setpic(); }); +Mousetrap.bind('b', function() { exposure ++; say_exposure(); setpic(); }); +Mousetrap.bind('d', function() { exposure --; say_exposure(); setpic(); }); Mousetrap.bind('x', mark_deleted); Mousetrap.bind('X', mark_not_deleted); -- 2.44.1