Fix for FixedLayout.index returning incorrect values depending on position in spread. (#59)

This commit is contained in:
Protected
2025-05-13 13:18:03 +00:00
committed by GitHub
parent 1e8080754c
commit 9fc0b62803
+1 -1
View File
@@ -241,7 +241,7 @@ export class FixedLayout extends HTMLElement {
}
get index() {
const spread = this.#spreads[this.#index]
const section = spread?.center ?? (this.side === 'left'
const section = spread?.center ?? (this.#side === 'left'
? spread.left ?? spread.right : spread.right ?? spread.left)
return this.book.sections.indexOf(section)
}