mirror of
https://github.com/john-okeefe/foliate-js.git
synced 2026-09-09 11:29:14 -04:00
Move section marks calculation to view
Also try to fix section mark epsilon
This commit is contained in:
@@ -327,6 +327,10 @@ export class View extends HTMLElement {
|
||||
for (const { doc } of this.renderer.getContents())
|
||||
doc.defaultView.getSelection().removeAllRanges()
|
||||
}
|
||||
getSectionFractions() {
|
||||
return (this.#sectionProgress?.sectionFractions ?? [])
|
||||
.map(x => x + Number.EPSILON)
|
||||
}
|
||||
getProgressOf(index, range) {
|
||||
const tocItem = this.#tocProgress?.getProgress(index, range)
|
||||
const pageItem = this.#pageProgress?.getProgress(index, range)
|
||||
|
||||
Reference in New Issue
Block a user