Giter Club home page Giter Club logo

Comments (6)

carman247 avatar carman247 commented on August 20, 2024 1

Figure this out, just needed to save the paginationInfo.locator.json String returned from paginationCallback on the EpubScreen widget.

from iridium.

carman247 avatar carman247 commented on August 20, 2024 1

Thanks, I'll hopefully have some time to check this out later in the week. I'll create a PR or something if I manage to get it working.

from iridium.

jmgeffroy avatar jmgeffroy commented on August 20, 2024

I don't close for now, can you confirm it's OK once it works in your app?

from iridium.

carman247 avatar carman247 commented on August 20, 2024

@jmgeffroy It works when using that string in the location field of the EpubScreen widget.

Not sure why but sometimes it restores the previous page, even though the correct progress double/float is being stored.

Have tested this quite a few times. Not a major issue for me right now but would be nice to figure out what's causing that.

from iridium.

jmgeffroy avatar jmgeffroy commented on August 20, 2024

Thank you for the feedback. So maybe for now I'll leave this topic open, and close it once I'll have found why you observe this small discrepancy. For now I'm completely involved in a huge development and will be more available in a few weeks to improve this kind of issues. Hopefully... 😄

from iridium.

jmgeffroy avatar jmgeffroy commented on August 20, 2024

Just an idea about this. If you look at the JS tricks that we are using, we place small divs at the top of each page, this is what allows us to detect when we reach the last page and the swipe should be handled by the PageView instead of the WebView. You can see the code here:

for (let i = 0; i < nbCols; i++) {
let divText =
'<div id="readium_page_' +
i +
'" data-page="' +
i +
'" class="readium_page_overlay">' +

These divs are given ids such as readium_page_1, readium_page_2 etc. So you could probably modify the code to store this information in the pagination info, too, and use it when restoring the position, by making the div corresponding to the requested page visible.
It's just an idea, I'm really not currently in the details of this code, and I don't remember if it's already the way we have implemented it.

from iridium.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.