Merge pull request #3 from kennethlarsen/master
Change page by arrow keys
This commit is contained in:
commit
9a65d2c4aa
1 changed files with 12 additions and 0 deletions
|
@ -321,7 +321,19 @@ function ComicBook(id, srcs, opts) {
|
|||
.attr("id", "cb-loading-overlay")
|
||||
.addClass("cb-control")
|
||||
};
|
||||
/*Using left arrow key*/
|
||||
$(document).keydown(function(e) {
|
||||
if (e.keyCode == 37) {
|
||||
ComicBook.prototype.drawPrevPage();
|
||||
}
|
||||
});
|
||||
|
||||
/*Using right arrow key*/
|
||||
$(document).keydown(function(e) {
|
||||
if (e.keyCode == 39) {
|
||||
ComicBook.prototype.drawNextPage();
|
||||
}
|
||||
});
|
||||
ComicBook.prototype.renderControls = function() {
|
||||
|
||||
$(canvas)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue