mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-03 14:59:18 +02:00
Stop expand on pre-paginated, adjust images only on if not pre-paginated, update deps
This commit is contained in:
parent
b21a35258b
commit
ad9dd35fb5
3 changed files with 14 additions and 7 deletions
10
package.json
10
package.json
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "epubjs",
|
||||
"version": "0.3.6",
|
||||
"version": "0.3.7",
|
||||
"description": "Parse and Render Epubs",
|
||||
"main": "lib/index.js",
|
||||
"jsnext:main": "src/index.js",
|
||||
|
@ -29,7 +29,7 @@
|
|||
"babel-plugin-add-module-exports": "^0.2.1",
|
||||
"babel-plugin-transform-runtime": "^6.15.0",
|
||||
"babel-polyfill": "^6.16.0",
|
||||
"babel-preset-env": "0.0.9",
|
||||
"babel-preset-env": "1.0.2",
|
||||
"babel-preset-es2015": "^6.18.0",
|
||||
"babili-webpack-plugin": "0.0.7",
|
||||
"colors": "^1.1.2",
|
||||
|
@ -38,16 +38,16 @@
|
|||
"express": "^4.5.1",
|
||||
"gulp": "^3.9.0",
|
||||
"gulp-concat": "^2.3.4",
|
||||
"gulp-connect": "~3.1.1",
|
||||
"gulp-connect": "~5.0.0",
|
||||
"gulp-documentation": "fchasen/gulp-documentation",
|
||||
"gulp-jshint": "^2.0.0",
|
||||
"gulp-plumber": "^1.1.0",
|
||||
"gulp-rename": "^1.2.0",
|
||||
"gulp-size": "^2.0.0",
|
||||
"gulp-sourcemaps": "^1.6.0",
|
||||
"gulp-uglify": "^1.5.3",
|
||||
"gulp-uglify": "^2.0.0",
|
||||
"gulp-util": "^3.0.0",
|
||||
"jquery": "^2.1.4",
|
||||
"jquery": "^3.1.1",
|
||||
"jshint": "^2.9.3",
|
||||
"karma": "^1.3.0",
|
||||
"karma-mocha": "^1.2.0",
|
||||
|
|
|
@ -210,7 +210,6 @@ class IframeView {
|
|||
|
||||
this.lockedWidth = width - elBorders.width - iframeBorders.width;
|
||||
this.lockedHeight = height - elBorders.height - iframeBorders.height;
|
||||
|
||||
this.resize(this.lockedWidth, this.lockedHeight);
|
||||
}
|
||||
|
||||
|
@ -235,6 +234,8 @@ class IframeView {
|
|||
|
||||
if(!this.iframe || this._expanding) return;
|
||||
|
||||
if(this.layout.name === "pre-paginated") return;
|
||||
|
||||
this._expanding = true;
|
||||
|
||||
// Expand Horizontally
|
||||
|
|
|
@ -575,9 +575,15 @@ class Rendition {
|
|||
*/
|
||||
adjustImages(contents) {
|
||||
|
||||
if (this._layout.name === "pre-paginated") {
|
||||
return new Promise(function(resolve){
|
||||
resolve();
|
||||
});
|
||||
}
|
||||
|
||||
contents.addStylesheetRules([
|
||||
["img",
|
||||
["max-width", (this._layout.spreadWidth) + "px"],
|
||||
["max-width", (this._layout.columnWidth) + "px"],
|
||||
["max-height", (this._layout.height) + "px"]
|
||||
]
|
||||
]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue