Skip to content

Commit

Permalink
FXL: fix page turning around blank pages
Browse files Browse the repository at this point in the history
  • Loading branch information
johnfactotum committed Sep 9, 2023
1 parent 5e0f319 commit 83e709f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions fixed-layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,13 @@ export class FixedLayout extends HTMLElement {
} else {
this.#left = await this.#createFrame(left)
this.#right = await this.#createFrame(right)
this.#side = side
this.#side = this.#left.blank ? 'right'
: this.#right.blank ? 'left' : side
this.#render()
}
}
#goLeft() {
if (this.#center) return
if (this.#left?.blank) return true
if (this.#center || this.#left?.blank) return
if (this.#portrait && this.#left?.element?.style?.display === 'none') {
this.#right.element.style.display = 'none'
this.#left.element.style.display = 'block'
Expand All @@ -163,8 +163,7 @@ export class FixedLayout extends HTMLElement {
}
}
#goRight() {
if (this.#center) return
if (this.#right?.blank) return true
if (this.#center || this.#right?.blank) return
if (this.#portrait && this.#right?.element?.style?.display === 'none') {
this.#left.element.style.display = 'none'
this.#right.element.style.display = 'block'
Expand Down

0 comments on commit 83e709f

Please sign in to comment.