1
0
Fork 0
mirror of https://github.com/futurepress/epub.js.git synced 2025-10-04 15:09:16 +02:00

Stop expand on pre-paginated, adjust images only on if not pre-paginated, update deps

This commit is contained in:
Fred Chasen 2016-12-14 16:07:10 +01:00
parent b21a35258b
commit ad9dd35fb5
3 changed files with 14 additions and 7 deletions

View file

@ -1,6 +1,6 @@
{ {
"name": "epubjs", "name": "epubjs",
"version": "0.3.6", "version": "0.3.7",
"description": "Parse and Render Epubs", "description": "Parse and Render Epubs",
"main": "lib/index.js", "main": "lib/index.js",
"jsnext:main": "src/index.js", "jsnext:main": "src/index.js",
@ -29,7 +29,7 @@
"babel-plugin-add-module-exports": "^0.2.1", "babel-plugin-add-module-exports": "^0.2.1",
"babel-plugin-transform-runtime": "^6.15.0", "babel-plugin-transform-runtime": "^6.15.0",
"babel-polyfill": "^6.16.0", "babel-polyfill": "^6.16.0",
"babel-preset-env": "0.0.9", "babel-preset-env": "1.0.2",
"babel-preset-es2015": "^6.18.0", "babel-preset-es2015": "^6.18.0",
"babili-webpack-plugin": "0.0.7", "babili-webpack-plugin": "0.0.7",
"colors": "^1.1.2", "colors": "^1.1.2",
@ -38,16 +38,16 @@
"express": "^4.5.1", "express": "^4.5.1",
"gulp": "^3.9.0", "gulp": "^3.9.0",
"gulp-concat": "^2.3.4", "gulp-concat": "^2.3.4",
"gulp-connect": "~3.1.1", "gulp-connect": "~5.0.0",
"gulp-documentation": "fchasen/gulp-documentation", "gulp-documentation": "fchasen/gulp-documentation",
"gulp-jshint": "^2.0.0", "gulp-jshint": "^2.0.0",
"gulp-plumber": "^1.1.0", "gulp-plumber": "^1.1.0",
"gulp-rename": "^1.2.0", "gulp-rename": "^1.2.0",
"gulp-size": "^2.0.0", "gulp-size": "^2.0.0",
"gulp-sourcemaps": "^1.6.0", "gulp-sourcemaps": "^1.6.0",
"gulp-uglify": "^1.5.3", "gulp-uglify": "^2.0.0",
"gulp-util": "^3.0.0", "gulp-util": "^3.0.0",
"jquery": "^2.1.4", "jquery": "^3.1.1",
"jshint": "^2.9.3", "jshint": "^2.9.3",
"karma": "^1.3.0", "karma": "^1.3.0",
"karma-mocha": "^1.2.0", "karma-mocha": "^1.2.0",

View file

@ -210,7 +210,6 @@ class IframeView {
this.lockedWidth = width - elBorders.width - iframeBorders.width; this.lockedWidth = width - elBorders.width - iframeBorders.width;
this.lockedHeight = height - elBorders.height - iframeBorders.height; this.lockedHeight = height - elBorders.height - iframeBorders.height;
this.resize(this.lockedWidth, this.lockedHeight); this.resize(this.lockedWidth, this.lockedHeight);
} }
@ -235,6 +234,8 @@ class IframeView {
if(!this.iframe || this._expanding) return; if(!this.iframe || this._expanding) return;
if(this.layout.name === "pre-paginated") return;
this._expanding = true; this._expanding = true;
// Expand Horizontally // Expand Horizontally

View file

@ -575,9 +575,15 @@ class Rendition {
*/ */
adjustImages(contents) { adjustImages(contents) {
if (this._layout.name === "pre-paginated") {
return new Promise(function(resolve){
resolve();
});
}
contents.addStylesheetRules([ contents.addStylesheetRules([
["img", ["img",
["max-width", (this._layout.spreadWidth) + "px"], ["max-width", (this._layout.columnWidth) + "px"],
["max-height", (this._layout.height) + "px"] ["max-height", (this._layout.height) + "px"]
] ]
]); ]);