]>
Commit | Line | Data |
---|---|---|
1 | var exposure = 20; | |
2 | var input_index = 0; | |
3 | var zoom = "sm/"; | |
4 | ||
5 | function setpic() { | |
6 | $("#pic").attr("src", zoom + exposure + "/" + files[input_index]); | |
7 | } | |
8 | ||
9 | function toggle_zoom() { | |
10 | if (zoom) { | |
11 | zoom = ""; | |
12 | } else { | |
13 | zoom = "sm/"; | |
14 | } | |
15 | } | |
16 | ||
17 | $(function() { | |
18 | setpic(); | |
19 | }); | |
20 | ||
21 | Mousetrap.bind('z', function() { toggle_zoom(); setpic(); }); | |
22 | Mousetrap.bind('Z', function() { $("#pic").toggleClass("fit_view"); }); | |
23 | Mousetrap.bind('n', function() { input_index ++; setpic(); }); | |
24 | Mousetrap.bind('p', function() { input_index --; setpic(); }); | |
25 | Mousetrap.bind('b', function() { exposure ++; setpic(); }); | |
26 | Mousetrap.bind('d', function() { exposure --; setpic(); }); |