summaryrefslogtreecommitdiff
path: root/lib/epub.js/src/managers/default
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2023-04-11 07:19:49 +0300
committerAndrew Dolgov <[email protected]>2023-04-11 07:19:49 +0300
commit8ce9ca1d928bda4b2721dfda03dbf2831b12626c (patch)
treebe881bed89d6cb977d4f68aeaa28cd0af9b9728d /lib/epub.js/src/managers/default
parenta72807a9b1c4d6b6688b86abd4b7b71feaea3ca0 (diff)
bump epubjs to 0.3.93
Diffstat (limited to 'lib/epub.js/src/managers/default')
-rw-r--r--lib/epub.js/src/managers/default/index.js16
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/epub.js/src/managers/default/index.js b/lib/epub.js/src/managers/default/index.js
index b24a4f6..2812d87 100644
--- a/lib/epub.js/src/managers/default/index.js
+++ b/lib/epub.js/src/managers/default/index.js
@@ -26,7 +26,9 @@ class DefaultViewManager {
writingMode: undefined,
flow: "scrolled",
ignoreClass: "",
- fullsize: undefined
+ fullsize: undefined,
+ allowScriptedContent: false,
+ allowPopups: false
});
extend(this.settings, options.settings || {});
@@ -39,7 +41,9 @@ class DefaultViewManager {
method: this.settings.method, // srcdoc, blobUrl, write
width: 0,
height: 0,
- forceEvenPages: true
+ forceEvenPages: true,
+ allowScriptedContent: this.settings.allowScriptedContent,
+ allowPopups: this.settings.allowPopups
};
this.rendered = false;
@@ -354,11 +358,11 @@ class DefaultViewManager {
}
if(this.settings.direction === 'rtl'){
/***
- the `floor` function above (L343) is on positive values, so we should add one `layout.delta`
+ the `floor` function above (L343) is on positive values, so we should add one `layout.delta`
to distX or use `Math.ceil` function, or multiply offset.left by -1
before `Math.floor`
*/
- distX = distX + this.layout.delta
+ distX = distX + this.layout.delta
distX = distX - width
}
this.scrollTo(distX, distY, true);
@@ -670,8 +674,8 @@ class DefaultViewManager {
let pageHeight = (container.height < window.innerHeight) ? container.height : window.innerHeight;
let pageWidth = (container.width < window.innerWidth) ? container.width : window.innerWidth;
let vertical = (this.settings.axis === "vertical");
- let rtl = (this.settings.direction === "rtl");
-
+ let rtl = (this.settings.direction === "rtl");
+
let offset = 0;
let used = 0;