diff --git a/examples/basic.html b/examples/basic.html index 65a4cbd..007f70d 100755 --- a/examples/basic.html +++ b/examples/basic.html @@ -40,6 +40,8 @@ ] ); book.draw(); + + window.onresize = book.drawPage; diff --git a/lib/ComicBook.js b/lib/ComicBook.js index ef9aca2..5096a40 100755 --- a/lib/ComicBook.js +++ b/lib/ComicBook.js @@ -428,8 +428,8 @@ function ComicBook(id, srcs, opts) { var zoom_scale; var offsetW = 0, offsetH = 0; - var page = this.getPage(pointer); - var page2 = this.getPage(pointer + 1); + var page = ComicBook.prototype.getPage(pointer); + var page2 = ComicBook.prototype.getPage(pointer + 1); if (typeof page !== "object") { throw new ComicBookException(ComicBookException.INVALID_PAGE_TYPE, typeof page); @@ -729,5 +729,5 @@ function ComicBook(id, srcs, opts) { return false; } }; - + }