From: Scott Worley Date: Thu, 6 Mar 2014 08:50:52 +0000 (-0800) Subject: 'e' to show current exposure level X-Git-Url: http://git.scottworley.com/picsort/commitdiff_plain/1899b67c13aa5e1ab0f4851691999c85e4141ff7?ds=inline 'e' to show current exposure level --- diff --git a/picsorter.js b/picsorter.js index 9229442..31a6a56 100644 --- a/picsorter.js +++ b/picsorter.js @@ -114,6 +114,15 @@ function mark_not_deleted() { say("Undeleted"); } +function say_exposure() { + if (!endsWith(files[input_index], ".NEF")) { + say("Exposure adjustment not available"); + return; + } + var display_exposure = (exposure / 4) - 3.5; + say((display_exposure >= 0 ? "+" : "") + display_exposure); +} + function change_exposure(amount) { if (!endsWith(files[input_index], ".NEF")) { say("Exposure adjustment not available"); @@ -123,8 +132,7 @@ function change_exposure(amount) { picinfo[files[input_index]].exposure = exposure; save_picinfo(); setpic(); - var display_exposure = (exposure / 4) - 3.5; - say((display_exposure >= 0 ? "+" : "") + display_exposure); + say_exposure(); } function rotate() { @@ -198,6 +206,7 @@ Mousetrap.bind('X', mark_not_deleted); Mousetrap.bind('r', rotate); Mousetrap.bind('i', announce); Mousetrap.bind('f', function() { say(files[input_index]); }); +Mousetrap.bind('e', function() { say_exposure(); }); Mousetrap.bind('c', function() { $("#name").show().focus(); return false; }); Mousetrap.bind('C', function() { if (last_name) { set_name(last_name); } }); Mousetrap.bind('%', function() { say((100 * input_index / files.length).toFixed(2) + "%"); });