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
RTL Fixed layout epub spread mode rendition.next() not working #1069
Comments
Check issue #1053, could be relevant to yours |
Don't know if #1053 is relevant since it is dealing with flow and mine is pre-paginated. I tested using the download from github this morning and the problem still exists. I made the following epub to test. The epub works as expected in Apple book. This problem surface in the latest version of epub.js. I was directed here from foliate because the last version used by foliate didn't have this issue (but it failed to render vertical text pages and only advance to next chapter rather than next page. The issue is fixed in this version) |
Can you post your settings? |
firefox 76.0.1 on Ubuntu 20.04, epub.js code downloaded from github using the download button, and using the example/input.html to load the book. Also, will it be related to #1070 ? BTW, in foliate, if the book dimension is changed to portrait mode (single page, no spread) then both directions works. |
The issue happens in Firefox(Negative RTL scroll mode) and with pre-paginated RTL books. the calculation goes wrong because this.layout.delta in pre-paginated layout and double page is equal to column width current line code for calculating left in RTL(negative scroll type): possible fix is the following code(needs testing): if time permits will issue a PR |
I replaced line 449 of src/managers/default/index.js with your suggestion. The navigation now works.
Navigate one more time page 3 shows up on the right panel and the order screwed up. Navigate back to cover now page 2 is showing up beside the cover. At all time the left page is not align to the right and thus leaving a gap between the pages. |
I managed to trace the error 2 of the above (a gap between the pages of the fixed layout book). The contents.fit() doesn't know if the page is at the right or left of the spread and only test if the page is "page-spread-left". In the rtl book if this is not set the page will be left aligned. I did a quick hack of the code to have section recorded the progression of the book, and added (section.direction === "rtl" && (section.index % 2 === 0)) to the condition for padding margin-left and it works. However don't know if it will break other things. And I think adding the direction to the section can also help fix #1070 - the code can check if the target index is even, then jump to target-1 and render both pages unless target - 1 is marked blank by spread-left|right, which will need the direction to check at the manager.display() code |
any update on this issue now i am experiencing same problem in chrome version 85.x |
RTL fixed layout epub, when opening with spread, rendition.next() has no response.
rendition.prev() works.
The text was updated successfully, but these errors were encountered: