mirror of
https://github.com/john-okeefe/foliate-js.git
synced 2026-10-24 22:59:51 -04:00
Move section marks calculation to view
Also try to fix section mark epsilon
This commit is contained in:
1 parent
7dcbc6921a
commit
2a6012d749
3 files changed
+26
-27
No files matched your search
@@ -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