futurepress / epub.js

Enhanced eBooks in the browser.
http://futurepress.org
Other
6.47k stars 1.11k forks source link

v0.3 rendition.display(url#location) and general status of 0.3 #528

Open mjwalsh opened 7 years ago

mjwalsh commented 7 years ago

I am currently working on a reader application that requires bookmarking a span of text and adding an annotation to a span of text. I found this page http://futurepress.org/update/2016/02/15/epubcfi-updates.html, it seems to do exactly what I need. I had already been working with epub.js 0.2 from the master branch, I grabbed the source from the 0.3 branch and updated my code to us it.

In v0.2 I was able to call book.goto("Text/Module_1.html#sigil_toc_id_19") and it would correctly load the Module_1.html file and navigate to the element with id="sigel_toc_id_19". In version 3 I am calling rendition.display("Text/Module_1.html#sigil_toc_id_19"). It loads the Module_1.html file but does not navigate to the sigel_toc_id_19 element, it just opens to the beginning of the html file. I've traced through the source code in managers/default/index.js, it looks like the display(section, target) and moveTo(offset) methods are not handling the sigel_toc_id_19 location correctly, they seem to be built just for the scrolling view (we are using the paginated view). Is rendition.display() supposed to support navigating this way? Is there any work around I can implement?

Also, what is the general state of v0.3, is it stable enough for production use?

fchasen commented 7 years ago

v0.3 is still missing some features (and tests) before I would call production ready but it is pretty stable at this point.

rendition.display should work how you are using it so it seem like there is a bug with finding the anchor.

zipme commented 7 years ago

@fchasen does v0.3 work in IE 11?

Sunil-bb commented 7 years ago

@mjwalsh : https://github.com/futurepress/epub.js/pull/513 should have fixed the issue you are referring to. Please check and comment if you are still facing issues.

Sunil-bb commented 7 years ago

@fchasen Raised https://github.com/futurepress/epub.js/pull/542 Please review and merge

Sunil-bb commented 7 years ago

@mjwalsh This issue has been fixed. Please take a look and close the bug.