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

Remove the PresentationMode special-case from BaseViewer.update #14794

Conversation

Snuffleupagus
Copy link
Collaborator

This special-case was added because the original PresentationMode-implementation used some CSS-tricks to hide everything except the current page. With the changes in PR #14112, which added a PAGE scroll-mode, many of the old PresentationMode-specific hacks could thus be removed from both the JS and CSS code.

This patch is yet another (small) clean-up step, to reduce the number of PresentationMode special-cases used throughout the BaseViewer. Note in particular that BaseViewer.update now works just fine in PresentationMode[1], and that we only need to ensure that the active page won't accidentally change because of the PresentationMode-specific zooming that occurs during page-switching.


[1] In the event that we ever want to try and support spread-modes in PresentationMode, which I'm really not keen on doing since documents with varying page sizes will be annoying to handle, these changes would be necessary as well.

@Snuffleupagus Snuffleupagus marked this pull request as draft April 18, 2022 15:54
This special-case was added because the original PresentationMode-implementation used some CSS-tricks to hide everything except the current page. With the changes in PR 14112, which added a PAGE scroll-mode, many of the old PresentationMode-specific hacks could thus be removed from both the JS and CSS code.

This patch is yet another (small) clean-up step, to reduce the number of PresentationMode special-cases used throughout the `BaseViewer`. Note in particular that `BaseViewer.update` now works just fine in PresentationMode[1], and that we only need to ensure that the active page won't *accidentally* change because of the PresentationMode-specific zooming that occurs during page-switching.

---
[1] In the event that we ever want to try and support spread-modes in PresentationMode, which I'm really not keen on doing since documents with varying page sizes will be annoying to handle, these changes would be necessary as well.
@Snuffleupagus Snuffleupagus force-pushed the BaseViewer-update-isInPresentationMode branch from 014339c to c91d2ac Compare April 20, 2022 10:17
@Snuffleupagus Snuffleupagus marked this pull request as ready for review April 20, 2022 10:19
@Snuffleupagus
Copy link
Collaborator Author

/botio-linux preview

@pdfjsbot
Copy link

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/c1d73bd4018c708/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/c1d73bd4018c708/output.txt

Total script time: 2.59 mins

Published

@timvandermeij timvandermeij merged commit 5e8b2e5 into mozilla:master Apr 20, 2022
@timvandermeij
Copy link
Contributor

Thank you for doing this!

@Snuffleupagus Snuffleupagus deleted the BaseViewer-update-isInPresentationMode branch April 20, 2022 19:58
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