Skip to content
This repository has been archived by the owner on Nov 18, 2024. It is now read-only.

change relayout for horizontal scroll #109

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

DevStaKat
Copy link

changed _relayoutDefault to fix horizontal scrolling

@espresso3389
Copy link
Owner

I could not get your point. Could you please explain your problem?

@DevStaKat
Copy link
Author

DevStaKat commented Mar 2, 2023

Vertical, there are no problems. But if we change the scrollDirection to horizontal, the behavior of the controller is strange. goToPage jumps to the next trimmed page or x-pages backward/forward or nothing happens. Also goToPage to last page jumps to some point in the document instead of the last page. It seems like the page width is wrong and thus the wrong page is being called. My change fixed this problem for our application.

Or is there a special configuration required for the horizontal ScrollDirection?
If so, can you please add an example so we can test if this corrects this strange behavior in our app

@DevStaKat
Copy link
Author

screen_pdf.mov

@DevStaKat
Copy link
Author

mobile.mov

@espresso3389
Copy link
Owner

OK, I understand your problem.

But, it's not so easy to change the current behavior without checking your code anyway.
I still don't understand the details of your code and, there is unknown magic number + 10...

@DevStaKat
Copy link
Author

Sorry, you can remove this '+10'. I just forgot about it, that was just a test.
The thought behind my change was to use the page width depending on the displayed height, since the docsize seems to be wrong. The 'pageRectZoomed.intersect' places always came out with the wrong range when debugging, which is why the controller then jumped wildly around the document. Therefore I have changed the calculation for the pages. I hope you understand what I mean, it's been a while since I customized this for us.
Of course I understand that you have to check my code.

Again, If you think horizontal is working correct in standard version, then just show me how to configure. I couldn't configure it right, so I debug the code and made this change

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants