X-Git-Url: http://git.scottworley.com/picsort/blobdiff_plain/52c0fe1e6ae207a7520aa731d5c3d21f5dde2a0c..d6874f6c6a9f60aacee8cd43fd16f3e9b73b22ec:/picsorter.js?ds=inline 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) + "%"); });