let dw = $this.fluidbook.settings.width * (dh / $this.fluidbook.settings.height);
let canvas = $('<canvas class="pscanvas" id="pscanvas_' + page + '" width="' + dw + '" height="' + dh + '" aria-hidden="true"></canvas>');
$("body").append(canvas);
- let c=canvas.get(0);
+ let c = canvas.get(0);
let ctx = c.getContext("2d");
let wr = dw / $this.fluidbook.settings.width;
let hr = dh / $this.fluidbook.settings.height;
// Draw background
+ ctx.fillStyle = "#FFFFFF";
+ ctx.fillRect(0, 0, dw, dh);
if ($this.backgrounds[page] !== undefined && $this.backgrounds[page] !== null) {
ctx.drawImage($this.backgrounds[page].get(0), 0, 0, dw * 1.002, dh);
} else {
- ctx.fillStyle = "#FFFFFF";
- ctx.fillRect(0, 0, dw, dh);
}
let afterTexts = function () {