added click/doubleclick for mobile (bOhEme request)

This commit is contained in:
Iam Naughton Phier 2015-03-26 15:14:07 +02:00
parent 781300522b
commit 47da8dfd35
2 changed files with 16 additions and 0 deletions

View file

@ -295,6 +295,12 @@ class @Sahli
dcol.width amt dcol.width amt
@loadkeys = -> @loadkeys = ->
$(document).on('dblclick', (ev) =>
@nextpic()
)
$(document).on('click', (ev) =>
@setscroll()
)
$(document).on('keydown', (ev) => $(document).on('keydown', (ev) =>
switch ev.which switch ev.which
when @keycode ' ' when @keycode ' '

View file

@ -346,6 +346,16 @@ l__________/__________|___|______l__________j_____j
}; };
Sahli.loadkeys = function() { 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 $(document).on('keydown', (function(_this) {
return function(ev) { return function(ev) {
switch (ev.which) { switch (ev.which) {