-
-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to navigate to a particular page using epub cfi #40
Comments
It's hard to say. Some ideas:
|
Thanks for the suggestions. Will debug and let you know |
You were right, the coordinates of the range from the cfi were not matching with the current page. And also noticed something strange. The width of the iframe, and the width of its parent div dont match. In my case, the width of the iframe is ~8000px, the width of the parent div is ~10500px. And when I scrolled the When the section initially loads, it is somehow scrolled to the right position, which is why |
No, that's expected. In order to slide out the section when transitioning to the next/previous section, there is one extra empty "page" on both sides of the section, which complicates things a little. |
@johnfactotum @yashspr this is also happening to me after updating to the latest code. Before updating, the reader relocated to the right position. In my case, I'm using |
Hey John, first of all, thanks for building this amazing project. It is much better than epubjs.
Here is what i am trying to do:
relocate
event.What is happening?
I am retrieving the saved cfi and using the
this.view.goTo()
method to go to that cfi position. But it doesn't take me to the right page. Its usually one or two pages behind.Here is a small snippet:
What I think is happening?
goTo
might be calculating the page to go to before the styles are loaded. The styles includes things like font size, font family, etc. which can affect the pagination.goTo
from the browser console after all the styles are loaded, it still fails.So I am not sure what is happening. Any help here is greatly apprecited. Thanks.
The text was updated successfully, but these errors were encountered: