From 52c0fe1e6ae207a7520aa731d5c3d21f5dde2a0c Mon Sep 17 00:00:00 2001 From: Scott Worley Date: Tue, 4 Mar 2014 23:18:04 -0800 Subject: [PATCH] 'i' to show Info (number, name) for current pic --- picsorter.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/picsorter.js b/picsorter.js index 084831c..9229442 100644 --- a/picsorter.js +++ b/picsorter.js @@ -54,6 +54,9 @@ function say(message) { $("#message").text(message).removeClass("fade"); setTimeout(function() { $("#message").addClass("fade"); }, 1); } +function announce() { + say(input_index + " " + (picinfo[files[input_index]].name || "")); +} function toggle_zoom() { if (zoom) { @@ -83,7 +86,7 @@ function move_by_filter(direction, filter) { } } input_index = new_index; - say(input_index + " " + (picinfo[files[input_index]].name || "")); + announce(); setpic(); } function move(direction) { @@ -193,6 +196,7 @@ Mousetrap.bind(['d', 'j'], function() { change_exposure(-1); }); Mousetrap.bind('x', mark_deleted); Mousetrap.bind('X', mark_not_deleted); Mousetrap.bind('r', rotate); +Mousetrap.bind('i', announce); Mousetrap.bind('f', function() { say(files[input_index]); }); Mousetrap.bind('c', function() { $("#name").show().focus(); return false; }); Mousetrap.bind('C', function() { if (last_name) { set_name(last_name); } }); -- 2.44.1