]> git.scottworley.com Git - picsort/blame_incremental - picsorter.js
Zoom by switching to smaller preprocessed images
[picsort] / picsorter.js
... / ...
CommitLineData
1var exposure = 20;
2var input_index = 0;
3var zoom = "sm/";
4
5function setpic() {
6 $("#pic").attr("src", zoom + exposure + "/" + files[input_index]);
7}
8
9function toggle_zoom() {
10 if (zoom) {
11 zoom = "";
12 } else {
13 zoom = "sm/";
14 }
15}
16
17$(function() {
18 setpic();
19});
20
21Mousetrap.bind('z', function() { toggle_zoom(); setpic(); });
22Mousetrap.bind('Z', function() { $("#pic").toggleClass("fit_view"); });
23Mousetrap.bind('n', function() { input_index ++; setpic(); });
24Mousetrap.bind('p', function() { input_index --; setpic(); });
25Mousetrap.bind('b', function() { exposure ++; setpic(); });
26Mousetrap.bind('d', function() { exposure --; setpic(); });