redraw comic on window resize

This commit is contained in:
Bala Clark 2011-09-02 20:28:41 +02:00
parent 0af57f1c52
commit 7760c0470e
2 changed files with 5 additions and 3 deletions

View file

@ -40,6 +40,8 @@
] ]
); );
book.draw(); book.draw();
window.onresize = book.drawPage;
</script> </script>
</body> </body>
</html> </html>

View file

@ -428,8 +428,8 @@ function ComicBook(id, srcs, opts) {
var zoom_scale; var zoom_scale;
var offsetW = 0, offsetH = 0; var offsetW = 0, offsetH = 0;
var page = this.getPage(pointer); var page = ComicBook.prototype.getPage(pointer);
var page2 = this.getPage(pointer + 1); var page2 = ComicBook.prototype.getPage(pointer + 1);
if (typeof page !== "object") { if (typeof page !== "object") {
throw new ComicBookException(ComicBookException.INVALID_PAGE_TYPE, typeof page); throw new ComicBookException(ComicBookException.INVALID_PAGE_TYPE, typeof page);
@ -729,5 +729,5 @@ function ComicBook(id, srcs, opts) {
return false; return false;
} }
}; };
} }