Comparing version 0.3.71 to 0.3.72
@@ -194,6 +194,2 @@ "use strict"; | ||
if (this.content === this.document.body && rect.left) { | ||
width += rect.left; | ||
} | ||
if (border && border.width) { | ||
@@ -225,6 +221,2 @@ width += border.width; | ||
if (this.content === this.document.body && rect.top) { | ||
height += rect.top; | ||
} | ||
if (height && border.height) { | ||
@@ -231,0 +223,0 @@ height += border.height; |
@@ -97,8 +97,8 @@ "use strict"; | ||
// Is a range object | ||
} else if ((typeof cfi === "undefined" ? "undefined" : _typeof(cfi)) === "object" && ((0, _core.type)(cfi) === "Range" || typeof cfi.startContainer != "undefined")) { | ||
} else if (cfi && (typeof cfi === "undefined" ? "undefined" : _typeof(cfi)) === "object" && ((0, _core.type)(cfi) === "Range" || typeof cfi.startContainer != "undefined")) { | ||
return "range"; | ||
} else if ((typeof cfi === "undefined" ? "undefined" : _typeof(cfi)) === "object" && typeof cfi.nodeType != "undefined") { | ||
} else if (cfi && (typeof cfi === "undefined" ? "undefined" : _typeof(cfi)) === "object" && typeof cfi.nodeType != "undefined") { | ||
// || typeof cfi === "function" | ||
return "node"; | ||
} else if ((typeof cfi === "undefined" ? "undefined" : _typeof(cfi)) === "object" && cfi instanceof EpubCFI) { | ||
} else if (cfi && (typeof cfi === "undefined" ? "undefined" : _typeof(cfi)) === "object" && cfi instanceof EpubCFI) { | ||
return "EpubCFI"; | ||
@@ -105,0 +105,0 @@ } else { |
@@ -308,6 +308,6 @@ "use strict"; | ||
if (this.settings.forceEvenPages) { | ||
columns = width / this.layout.delta; | ||
columns = width / this.layout.pageWidth; | ||
if (this.layout.divisor > 1 && this.layout.name === "reflowable" && columns % 2 > 0) { | ||
// add a blank page | ||
width += this.layout.gap + this.layout.columnWidth; | ||
width += this.layout.pageWidth; | ||
} | ||
@@ -314,0 +314,0 @@ } |
@@ -245,3 +245,3 @@ 'use strict'; | ||
// node = manifestNode.querySelector("item[id='" + tocId + "']"); | ||
node = manifestNode.getElementById(tocId); | ||
node = manifestNode.querySelector('#' + tocId); | ||
} | ||
@@ -248,0 +248,0 @@ } |
@@ -124,3 +124,3 @@ "use strict"; | ||
if (typeof XMLSerializer === "undefined" || isIE) { | ||
Serializer = require("xmldom").XMLSerializer; | ||
Serializer = require("xmldom/dom-parser").XMLSerializer; | ||
} else { | ||
@@ -127,0 +127,0 @@ Serializer = XMLSerializer; |
@@ -31,3 +31,4 @@ "use strict"; | ||
SCROLL: "scroll", | ||
SCROLLED: "scrolled" | ||
SCROLLED: "scrolled", | ||
REMOVED: "removed" | ||
}, | ||
@@ -34,0 +35,0 @@ VIEWS: { |
{ | ||
"name": "epubjs", | ||
"version": "0.3.71", | ||
"version": "0.3.72", | ||
"description": "Parse and Render Epubs", | ||
@@ -78,2 +78,3 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@types/jszip": "^3.1.4", | ||
"event-emitter": "^0.3.5", | ||
@@ -80,0 +81,0 @@ "jszip": "^3.1.5", |
@@ -160,6 +160,2 @@ import EventEmitter from "event-emitter"; | ||
if (this.content === this.document.body && rect.left) { | ||
width += rect.left; | ||
} | ||
if (border && border.width) { | ||
@@ -188,6 +184,2 @@ width += border.width; | ||
if (this.content === this.document.body && rect.top) { | ||
height += rect.top; | ||
} | ||
if (height && border.height) { | ||
@@ -194,0 +186,0 @@ height += border.height; |
@@ -80,7 +80,7 @@ import {extend, type, findChildren, RangeObject, isNumber} from "./utils/core"; | ||
// Is a range object | ||
} else if (typeof cfi === "object" && (type(cfi) === "Range" || typeof(cfi.startContainer) != "undefined")){ | ||
} else if (cfi && typeof cfi === "object" && (type(cfi) === "Range" || typeof(cfi.startContainer) != "undefined")){ | ||
return "range"; | ||
} else if (typeof cfi === "object" && typeof(cfi.nodeType) != "undefined" ){ // || typeof cfi === "function" | ||
} else if (cfi && typeof cfi === "object" && typeof(cfi.nodeType) != "undefined" ){ // || typeof cfi === "function" | ||
return "node"; | ||
} else if (typeof cfi === "object" && cfi instanceof EpubCFI){ | ||
} else if (cfi && typeof cfi === "object" && cfi instanceof EpubCFI){ | ||
return "EpubCFI"; | ||
@@ -87,0 +87,0 @@ } else { |
@@ -280,3 +280,3 @@ import EventEmitter from "event-emitter"; | ||
if (this.settings.forceEvenPages) { | ||
columns = (width / this.layout.delta); | ||
columns = (width / this.layout.pageWidth); | ||
if ( this.layout.divisor > 1 && | ||
@@ -286,3 +286,3 @@ this.layout.name === "reflowable" && | ||
// add a blank page | ||
width += this.layout.gap + this.layout.columnWidth; | ||
width += this.layout.pageWidth; | ||
} | ||
@@ -289,0 +289,0 @@ } |
@@ -217,3 +217,3 @@ import {qs, qsa, qsp, indexOfElementNode} from "./utils/core"; | ||
// node = manifestNode.querySelector("item[id='" + tocId + "']"); | ||
node = manifestNode.getElementById(tocId); | ||
node = manifestNode.querySelector(`#${tocId}`); | ||
} | ||
@@ -220,0 +220,0 @@ } |
@@ -98,3 +98,3 @@ import { defer } from "./utils/core"; | ||
if (typeof XMLSerializer === "undefined" || isIE) { | ||
Serializer = require("xmldom").XMLSerializer; | ||
Serializer = require("xmldom/dom-parser").XMLSerializer; | ||
} else { | ||
@@ -101,0 +101,0 @@ Serializer = XMLSerializer; |
@@ -26,3 +26,4 @@ export const EPUBJS_VERSION = "0.3"; | ||
SCROLL : "scroll", | ||
SCROLLED : "scrolled" | ||
SCROLLED : "scrolled", | ||
REMOVED : "removed", | ||
}, | ||
@@ -29,0 +30,0 @@ VIEWS : { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
Non-permissive License
License(Experimental) A license not known to be considered permissive was found.
Found 1 instance in 1 package
1
100
14
3024875
8
152
49326
+ Added@types/jszip@^3.1.4
+ Added@types/jszip@3.4.1(transitive)