mirror of
https://github.com/john-okeefe/foliate-js.git
synced 2026-09-09 11:29:14 -04:00
CFI: wrap fake CFI
This commit is contained in:
+1
-1
@@ -327,7 +327,7 @@ export const toElement = (doc, parts) =>
|
|||||||
|
|
||||||
// turn indices into standard CFIs when you don't have an actual package document
|
// turn indices into standard CFIs when you don't have an actual package document
|
||||||
export const fake = {
|
export const fake = {
|
||||||
fromIndex: index => `/6/${(index + 1) * 2}`,
|
fromIndex: index => wrap(`/6/${(index + 1) * 2}`),
|
||||||
toIndex: parts => parts?.at(-1).index / 2 - 1,
|
toIndex: parts => parts?.at(-1).index / 2 - 1,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user