mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-03 14:59:18 +02:00
Flow update fixes
This commit is contained in:
parent
a899ddd4d6
commit
afc906e6b3
3 changed files with 10 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "epubjs",
|
"name": "epubjs",
|
||||||
"version": "0.3.34",
|
"version": "0.3.35",
|
||||||
"description": "Parse and Render Epubs",
|
"description": "Parse and Render Epubs",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"module": "src/index.js",
|
"module": "src/index.js",
|
||||||
|
|
|
@ -15,7 +15,8 @@ class Layout {
|
||||||
this._minSpreadWidth = settings.minSpreadWidth || 800;
|
this._minSpreadWidth = settings.minSpreadWidth || 800;
|
||||||
this._evenSpreads = settings.evenSpreads || false;
|
this._evenSpreads = settings.evenSpreads || false;
|
||||||
|
|
||||||
if (settings.flow === "scrolled-continuous" ||
|
if (settings.flow === "scrolled" ||
|
||||||
|
settings.flow === "scrolled-continuous" ||
|
||||||
settings.flow === "scrolled-doc") {
|
settings.flow === "scrolled-doc") {
|
||||||
this._flow = "scrolled";
|
this._flow = "scrolled";
|
||||||
} else {
|
} else {
|
||||||
|
@ -53,7 +54,8 @@ class Layout {
|
||||||
*/
|
*/
|
||||||
flow(flow) {
|
flow(flow) {
|
||||||
if (typeof(flow) != "undefined") {
|
if (typeof(flow) != "undefined") {
|
||||||
if (flow === "scrolled-continuous" ||
|
if (flow === "scrolled" ||
|
||||||
|
flow === "scrolled-continuous" ||
|
||||||
flow === "scrolled-doc") {
|
flow === "scrolled-doc") {
|
||||||
this._flow = "scrolled";
|
this._flow = "scrolled";
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -405,7 +405,9 @@ class Rendition {
|
||||||
*/
|
*/
|
||||||
flow(flow){
|
flow(flow){
|
||||||
var _flow = flow;
|
var _flow = flow;
|
||||||
if (flow === "scrolled-doc" || flow === "scrolled-continuous") {
|
if (flow === "scrolled" ||
|
||||||
|
flow === "scrolled-doc" ||
|
||||||
|
flow === "scrolled-continuous") {
|
||||||
_flow = "scrolled";
|
_flow = "scrolled";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -413,6 +415,8 @@ class Rendition {
|
||||||
_flow = "paginated";
|
_flow = "paginated";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.settings.flow = flow;
|
||||||
|
|
||||||
if (this._layout) {
|
if (this._layout) {
|
||||||
this._layout.flow(_flow);
|
this._layout.flow(_flow);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue