1
0
Fork 0
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:
bill-titus 2017-03-24 19:25:08 -04:00 committed by GitHub
parent 268df221d2
commit 3cbad7730f

View file

@ -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;