diff --git a/sahli.coffee b/sahli.coffee index 9382403..82ca412 100644 --- a/sahli.coffee +++ b/sahli.coffee @@ -295,6 +295,12 @@ class @Sahli dcol.width amt @loadkeys = -> + $(document).on('dblclick', (ev) => + @nextpic() + ) + $(document).on('click', (ev) => + @setscroll() + ) $(document).on('keydown', (ev) => switch ev.which when @keycode ' ' diff --git a/sahli.js b/sahli.js index 821024c..cd4dcc8 100644 --- a/sahli.js +++ b/sahli.js @@ -346,6 +346,16 @@ l__________/__________|___|______l__________j_____j }; Sahli.loadkeys = function() { + $(document).on('dblclick', (function(_this) { + return function(ev) { + return _this.nextpic(); + }; + })(this)); + $(document).on('click', (function(_this) { + return function(ev) { + return _this.setscroll(); + }; + })(this)); return $(document).on('keydown', (function(_this) { return function(ev) { switch (ev.which) {