mirror of
https://github.com/john-okeefe/foliate-js.git
synced 2026-10-21 22:49:51 -04:00
Fix CFI for fixed-layout books
This commit is contained in:
1 parent
b1346280fd
commit
8a69caf1dd
1 file changed
+1
-1
@@ -163,8 +163,8 @@ export class View {
|
||||
this.emit?.({ type: 'show-annotation', value, range })
|
||||
}
|
||||
getCFI(index, range) {
|
||||
if (!range) return ''
|
||||
const baseCFI = this.book.sections[index].cfi ?? CFI.fake.fromIndex(index)
|
||||
if (!range) return baseCFI
|
||||
return CFI.joinIndir(baseCFI, CFI.fromRange(range))
|
||||
}
|
||||
resolveCFI(cfi) {
|
||||
|
||||
Reference in new issue
Block a user