mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-05 15:32:55 +02:00
Remove poison CFI fix for double spineIndex
It turns out that spineNodeIndex is set here: this.spineNodeIndex = Array.prototype.indexOf.call(spineNode.parentNode.childNodes, spineNode); And childNodes includes the list of all nodes (text and elements) already.
This commit is contained in:
parent
268df221d2
commit
3cbad7730f
1 changed files with 1 additions and 1 deletions
|
@ -948,7 +948,7 @@ class EpubCFI {
|
|||
|
||||
generateChapterComponent(_spineNodeIndex, _pos, id) {
|
||||
var pos = parseInt(_pos),
|
||||
spineNodeIndex = (_spineNodeIndex + 1) * 2,
|
||||
spineNodeIndex = _spineNodeIndex + 1,
|
||||
cfi = "/"+spineNodeIndex+"/";
|
||||
|
||||
cfi += (pos + 1) * 2;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue