diff --git a/package.json b/package.json index d8a6f3c..01f901f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "epubjs", - "version": "0.3.33", + "version": "0.3.34", "description": "Parse and Render Epubs", "main": "lib/index.js", "module": "src/index.js", @@ -75,6 +75,6 @@ "marks-pane": "^1.0.0", "path-webpack": "^0.0.3", "stream-browserify": "^2.0.1", - "xmldom": "^0.1.27" + "xmldom": "0.1.27" } } diff --git a/src/contents.js b/src/contents.js index eff87c8..bfe323a 100644 --- a/src/contents.js +++ b/src/contents.js @@ -685,18 +685,22 @@ class Contents { } size(width, height){ + var viewport = { scale: 1.0, scalable: "no" }; if (width >= 0) { this.width(width); + viewport.width = width; } if (height >= 0) { this.height(height); + viewport.height = height; } this.css("margin", "0"); this.css("box-sizing", "border-box"); + this.viewport(viewport); } columns(width, height, columnWidth, gap){ @@ -751,7 +755,7 @@ class Contents { this.overflow("hidden"); // Deal with Mobile trying to scale to viewport - this.viewport({ scale: 1.0 }); + this.viewport({ width: width, height: height, scale: 1.0 }); // Scale to the correct size this.scaler(scale, 0, offsetY);