Skip to content
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

Other suggestion to get animation pages transition #41

Closed
lpccoder opened this issue Sep 5, 2013 · 3 comments
Closed

Other suggestion to get animation pages transition #41

lpccoder opened this issue Sep 5, 2013 · 3 comments

Comments

@lpccoder
Copy link

lpccoder commented Sep 5, 2013

After my unsuccesfull try to get two page layouts to make a good animantion I suggest something new, but I'm not an expert in this field so I want to share this before start coding and know your opinion.
First we convert the page to a canvas object using html2canvas (https://github.com/niklasvh/html2canvas) and then animate the canvas object.
What do you think about this?

@fchasen
Copy link
Contributor

fchasen commented Sep 5, 2013

I think the best way to do something like this is still to use css like the following.
http://tympanus.net/codrops/2012/12/11/fullscreen-pageflip-layout/

I would use a fixed position epub like:

var Book = ePub({ fixedLayout : true });

and write a hook to split the content up into divs and inject the pageflip css.

The main issues I see with going this route is that the pageNext() function would be broken, as the chapter would appear to a 1 page long.

Any thoughts on how to allow overriding this would be appreciated, but to just try it out you could create your own page turning function and just call book.nextPage() when your ready to switch chapters.

@lpccoder
Copy link
Author

I have made a test to check if BookBlock could be used in an epub online reader.
I create a new index4e.htm file at (https://github.com/lpccoder/BookBlock/blob/master/index4e.html) after forking the BookBlock project. Also modified the demo4.css file to demo4e.css to avoid centering the text (https://github.com/lpccoder/BookBlock/blob/master/css/demo4e.css)
As you can see in the code I'm trying to control pagination using the jquery scrollTop function. It's a beta (good pagination requires more coding)
Why you use iframe to paginate the epub chapters?
Maybe I'm trying to paginate using divs when with iframe will be the correct way.
Where can I find the code that handles the pagination in epub.js?

@fchasen
Copy link
Contributor

fchasen commented Dec 5, 2014

Going to close this for now - still no ideal way split book content up into divs, would require writing a new renderer. Happy to see it reopened in the future.

@fchasen fchasen closed this as completed Dec 5, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants