mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-03 14:59:18 +02:00
Fix width to pixel amount, add direction to html if present on body
This commit is contained in:
parent
20183379b3
commit
a55f8a5741
2 changed files with 11 additions and 8 deletions
|
@ -70,8 +70,14 @@
|
|||
if (active) {
|
||||
active.classList.add("active");
|
||||
}
|
||||
|
||||
let urlParam = params && params.get("url");
|
||||
let url = '';
|
||||
if (urlParam) {
|
||||
url = "url=" + urlParam + "&";
|
||||
}
|
||||
// Add CFI fragment to the history
|
||||
history.pushState({}, '', "?loc=" + encodeURIComponent(section.href));
|
||||
history.pushState({}, '', "?" + url + "loc=" + encodeURIComponent(section.href));
|
||||
// window.location.hash = "#/"+section.href
|
||||
});
|
||||
|
||||
|
|
|
@ -779,15 +779,12 @@ class Contents {
|
|||
var COLUMN_WIDTH = prefixed("column-width");
|
||||
var COLUMN_FILL = prefixed("column-fill");
|
||||
|
||||
var isVertical = this.writingMode().indexOf("vertical") === 0;
|
||||
|
||||
if (isVertical) {
|
||||
this.width(width);
|
||||
} else {
|
||||
this.width("100%");
|
||||
// Fix body width issues if rtl is only set on body element
|
||||
if (this.content.dir === "rtl") {
|
||||
this.direction("rtl");
|
||||
}
|
||||
|
||||
// this.width("100%");
|
||||
this.width(width);
|
||||
this.height(height);
|
||||
|
||||
// Deal with Mobile trying to scale to viewport
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue