diff --git a/package.json b/package.json index 698d760..67706fe 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "epubjs", - "version": "0.3.8", + "version": "0.3.9", "description": "Parse and Render Epubs", "main": "lib/index.js", "jsnext:main": "src/index.js", @@ -13,11 +13,11 @@ "test": "./node_modules/.bin/karma start --single-run --browsers PhantomJS", "documentation": "./node_modules/.bin/gulp docs", "lint": "./node_modules/.bin/eslint -c .eslintrc.js src; exit 0", - "start": "webpack-dev-server --inline --d", - "build": "webpack --progress", - "minify": "NODE_ENV=production webpack --progress", - "legacy": "NODE_ENV=production LEGACY=true webpack --progress", - "compile": "babel --optional runtime -d lib/ src/", + "start": "./node_modules/.bin/webpack-dev-server --inline --d", + "build": "./node_modules/.bin/webpack --progress", + "minify": "NODE_ENV=production npm run build", + "legacy": "NODE_ENV=production LEGACY=true npm run build", + "compile": "./node_modules/.bin/babel --optional runtime -d lib/ src/", "prepublish": "npm run compile && npm run build && npm run minify && npm run legacy" }, "author": "fchasen@gmail.com", diff --git a/src/rendition.js b/src/rendition.js index 24d3f9e..0214a81 100644 --- a/src/rendition.js +++ b/src/rendition.js @@ -583,8 +583,10 @@ class Rendition { contents.addStylesheetRules([ ["img", - ["max-width", (this._layout.columnWidth) + "px"], - ["max-height", (this._layout.height) + "px"] + ["max-width", (this._layout.columnWidth) + "px; !important"], + ["max-height", (this._layout.height) + "px; !important"], + ["object-fit", "contain"], + ["page-break-inside", "avoid"] ] ]); return new Promise(function(resolve, reject){ diff --git a/webpack.config.js b/webpack.config.js index 3edf1e9..35259bb 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -4,7 +4,7 @@ var BabiliPlugin = require("babili-webpack-plugin"); var PROD = (process.env.NODE_ENV === 'production') var LEGACY = (process.env.LEGACY) var hostname = "localhost"; -var port = "8080"; +var port = 8080; var enter = LEGACY ? { "epub.legacy": ["babel-polyfill", "./libs/url/url.js", "./src/epub.js"] } : {