]> git.scottworley.com Git - picsort/blobdiff - picsorter.js
#namecontainer -> .inputcontainer
[picsort] / picsorter.js
index 24cc8938e054363048ab1159ca805662c86a70eb..91febfa4ef73ad0fa655bb59c16573d0488b9128 100644 (file)
@@ -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) + "%"); });