mirror of
https://github.com/john-okeefe/foliate-js.git
synced 2026-09-09 11:29:14 -04:00
FXL: fix page turning around blank pages
This commit is contained in:
+4
-5
@@ -148,13 +148,13 @@ export class FixedLayout extends HTMLElement {
|
|||||||
} else {
|
} else {
|
||||||
this.#left = await this.#createFrame(left)
|
this.#left = await this.#createFrame(left)
|
||||||
this.#right = await this.#createFrame(right)
|
this.#right = await this.#createFrame(right)
|
||||||
this.#side = side
|
this.#side = this.#left.blank ? 'right'
|
||||||
|
: this.#right.blank ? 'left' : side
|
||||||
this.#render()
|
this.#render()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#goLeft() {
|
#goLeft() {
|
||||||
if (this.#center) return
|
if (this.#center || this.#left?.blank) return
|
||||||
if (this.#left?.blank) return true
|
|
||||||
if (this.#portrait && this.#left?.element?.style?.display === 'none') {
|
if (this.#portrait && this.#left?.element?.style?.display === 'none') {
|
||||||
this.#right.element.style.display = 'none'
|
this.#right.element.style.display = 'none'
|
||||||
this.#left.element.style.display = 'block'
|
this.#left.element.style.display = 'block'
|
||||||
@@ -163,8 +163,7 @@ export class FixedLayout extends HTMLElement {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#goRight() {
|
#goRight() {
|
||||||
if (this.#center) return
|
if (this.#center || this.#right?.blank) return
|
||||||
if (this.#right?.blank) return true
|
|
||||||
if (this.#portrait && this.#right?.element?.style?.display === 'none') {
|
if (this.#portrait && this.#right?.element?.style?.display === 'none') {
|
||||||
this.#left.element.style.display = 'none'
|
this.#left.element.style.display = 'none'
|
||||||
this.#right.element.style.display = 'block'
|
this.#right.element.style.display = 'block'
|
||||||
|
|||||||
Reference in New Issue
Block a user