X-Git-Url: http://git.scottworley.com/picsort/blobdiff_plain/59a0fba182b1c592474e3c3c01730917b51828ea..76812d8fb224d6fe85d46d74f2657c397b67e53b:/picsorter.js diff --git a/picsorter.js b/picsorter.js index 24cc893..91febfa 100644 --- a/picsorter.js +++ b/picsorter.js @@ -41,11 +41,13 @@ function setpic() { display_filename = zoom + files[input_index]; } var $pic = $("#pic"); + $pic.on("load", function() { + $pic.removeClass("rot90 rot180 rot270"); + if ("rotate" in picinfo[files[input_index]]) { + $pic.addClass("rot" + picinfo[files[input_index]].rotate); + } + }); $pic.attr("src", display_filename); - $pic.removeClass("rot90 rot180 rot270"); - if ("rotate" in picinfo[files[input_index]]) { - $pic.addClass("rot" + picinfo[files[input_index]].rotate); - } } function say(message) { @@ -162,3 +164,4 @@ Mousetrap.bind('x', mark_deleted); Mousetrap.bind('X', mark_not_deleted); Mousetrap.bind('r', rotate); Mousetrap.bind('c', function() { $("#name").show().focus(); return false; }); +Mousetrap.bind('%', function() { say((100 * input_index / files.length).toFixed(2) + "%"); });