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

Hide the Scroll/Spread mode buttons if the viewer is a PDFSinglePageViewer instance (PR 9858 follow-up) #9877

Merged
merged 3 commits into from
Jul 8, 2018

Conversation

Snuffleupagus
Copy link
Collaborator

Please refer to the individual commit messages for additional details.

…ns, and add a missing comment in `PDFCursorTools`

The names 'resetscrollmode'/'resetspreadmode' were probably *not* great choices, given that the only thing being reset are toolbar buttons and not the actual Scroll/Spread modes. Furthermore, there's really no need for two separate events here.

The patch also adds a comment that ought to have been included in PR 9040, to prevent future refactoring/removing of what may appear to be an unnecessary `Promise.resolve` call.
…geViewer` instance

If the current viewer is a `PDFSinglePageViewer` instance the Scroll/Spread modes are no-ops, hence displaying buttons that do *nothing* when clicked will probably do very little besides confuse users.
… is enabled

Given that the non-default Spread modes (currently) doesn't affect the page layout when horizontal scrolling is enabled, having the Spread buttons appear active when clicking them appears to do *nothing* is probably confusing rather than helpful to users.
@Snuffleupagus
Copy link
Collaborator Author

/botio-linux preview

@pdfjsbot
Copy link

pdfjsbot commented Jul 8, 2018

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.67.70.0:8877/fab2c894b6fce7d/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Jul 8, 2018

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/fab2c894b6fce7d/output.txt

Total script time: 8.32 mins

Published

@timvandermeij timvandermeij merged commit 7e1f727 into mozilla:master Jul 8, 2018
@timvandermeij
Copy link
Contributor

Thank you for fine-tuning the implementation!

@Snuffleupagus Snuffleupagus deleted the scroll-spread-hide branch July 8, 2018 14:04
movsb pushed a commit to movsb/pdf.js that referenced this pull request Jul 14, 2018
Hide the Scroll/Spread mode buttons if the viewer is a `PDFSinglePageViewer` instance (PR 9858 follow-up)
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.

3 participants