fix: prevent mixed writing-mode views from coexisting in paginator#13
Conversation
- Add #directionCache to track section writing-modes after first load - Add #isSameDirection() check used by all preload entry points - #loadAdjacentSection: destroy cross-direction views immediately after load - #preloadNext, #fillVisibleArea, scroll handlers: stop at direction boundaries - #goTo: when direction changes, destroy all views and do full #display rebuild - #display pre-load: skip cross-direction adjacent sections This prevents horizontal cover pages and vertical text chapters from sharing the same flex container, which corrupted scroll/page calculations.
|
Please consider recreating the whole foliate-view and reopen the document if the writing-mode is changed which is currently the designed/implemented approach. This could avoid all kinds of cache / invalidation required in this PR. If there is any unexpected behavior, please open an issue in readest/readest or send a PR there. |
|
Sorry I realized that their might be possibility that the same document might have mixed writing-mode. Could you share an EPUB file that has this problem so that I can reproduce this issue? |
sure. please decompress this zip file and you will get the epub file. The covers in this epub file are horizontal while the text chapters are vertical. |
|
please review it. thanks! |
|
Looks great. Thanks. |
This prevents horizontal cover pages and vertical text chapters from sharing the same flex container, which corrupted scroll/page calculations.