Add header and footer

Also allow getting next location, which is useful for the footer
This commit is contained in:
John Factotum
2023-03-09 16:20:28 +08:00
parent 2c1919c099
commit 857a94daf3
3 changed files with 72 additions and 7 deletions
+2 -2
View File
@@ -162,9 +162,9 @@ export class View {
await this.annotations.add(annotation, true)
}
}
#onRelocated(range, index, fraction) {
#onRelocated(range, index, fraction, size) {
if (!this.#sectionProgress) return
const progress = this.#sectionProgress.getProgress(index, fraction)
const progress = this.#sectionProgress.getProgress(index, fraction, size)
const tocItem = this.#tocProgress.getProgress(index, range)
const pageItem = this.#pageProgress.getProgress(index, range)
const cfi = this.getCFI(index, range)