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

Re-factor the PresentationMode handling in BaseViewer.#ensurePageViewVisible #14871

Conversation

Snuffleupagus
Copy link
Collaborator

Given that we're (ab)using spread-modes in order to ensure that pages are centered vertically in PresentationMode, this re-factoring simplifies the code slightly.
Furthermore, in the event that we possibly want to try and support spread-modes in PresentationMode[1] this re-factoring will also prevent future duplication.


[1] Note that I'm not particularly keen on doing that, since documents with varying page sizes will be annoying to handle.

…wVisible`

Given that we're (ab)using spread-modes in order to ensure that pages are centered *vertically* in PresentationMode, this re-factoring simplifies the code slightly.
Furthermore, in the event that we *possibly* want to try and support spread-modes in PresentationMode[1] this re-factoring will also prevent future duplication.

---
[1] Note that I'm not particularly keen on doing that, since documents with varying page sizes will be annoying to handle.
@Snuffleupagus

This comment was marked as off-topic.

@pdfjsbot

This comment was marked as off-topic.

@pdfjsbot

This comment was marked as off-topic.

@mozilla mozilla deleted a comment from pdfjsbot May 3, 2022
@mozilla mozilla deleted a comment from pdfjsbot May 3, 2022
@Snuffleupagus
Copy link
Collaborator Author

/botio-linux preview

@pdfjsbot
Copy link

pdfjsbot commented May 3, 2022

From: Bot.io (Linux m4)


Received

Command cmd_preview from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.241.84.105:8877/0bbe035511dac50/output.txt

@pdfjsbot
Copy link

pdfjsbot commented May 3, 2022

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/0bbe035511dac50/output.txt

Total script time: 2.74 mins

Published

@timvandermeij timvandermeij merged commit 7d6d6f9 into mozilla:master May 4, 2022
@timvandermeij
Copy link
Contributor

Thank you!

@Snuffleupagus Snuffleupagus deleted the ensurePageViewVisible-PresentationMode-refactor branch May 5, 2022 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants