From 3655c21c20753ac3754c7514b27fb36872cb634a Mon Sep 17 00:00:00 2001 From: Bala Clark Date: Sat, 10 Jul 2010 13:56:07 +0100 Subject: [PATCH] reset canvas before rendering images --- scripts.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts.js b/scripts.js index fbf3c03..46f237f 100644 --- a/scripts.js +++ b/scripts.js @@ -181,6 +181,10 @@ function ComicBook(id, srcs, opts) { var width = page.width; + // reset the canvas to stop duplicate pages showing + canvas.width = 0; + canvas.height = 0; + if (options.displayMode === "double") { // for double page spreads, factor in the width of both pages