Merge pull request #3 from kennethlarsen/master

Change page by arrow keys
This commit is contained in:
Bala Clark 2012-10-28 11:36:15 -07:00
commit 9a65d2c4aa

View file

@ -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)