The logic for the hand tool is implemented in a separate project,
maintained at https://github.com/Rob--W/grab-to-pan.js
Integration notes
- Added toggle as an entry under the Secondary toolbar
- Added shortcut "h" to toggle hand tool (to-do: document this in wiki
after merge). This shortcut is also used in Adobe's Acrobat Reader.
To-do: localizations for:
hand_tool_enable.title=
hand_tool_enable_label=
hand_tool_disable.title=
hand_tool_disable_label=
To-do (wish): persistence of hand tool preference, preferably a global setting.
secondaryToolbarButton-handTool.png created by Stephen Horlander <shorlander@mozilla.com>
Before this commit there were two main issues:
- In small windows, the zoom controls visually floated above the page number
(e.g. 733px).
- In small windows, the (transparent) zoom container covered the go-to-page
input box, which prevented one from using the input field to quickly navigate
to a different page.
Two major issues:
1. Border/shadow around every page. Removed by adding "border:none".
2. Added "overflow:visible" (overrides "overflow:auto") in #viewContainer.
This solves two problems:
- It prevents scrollbars from appearing.
- Every "page" is automatically resized to fit on a printed page,
just like the Firefox.
To see what's wrong, here's a picture of how PDF.js rendered the pdf in
Chrome (using "Print to PDF" feature of Chrome):
https://robwu.nl/pdfjs/pdfjs-print-with-chromium-28.pdf
Successfully tested with Chrome 28 and Firefox 22.
Solves #3445
Before:
- Firefox's buttons looks OK
- Chrome (quirks mode): Buttons were aligned to the bottom (too much)
- Chrome (standards mode): Buttons were aligned to the top (too much)
- Opera/IE/Safari: Like Chrome (standards): Buttons too high
(Too high = Compare the other buttons to the rightmost button)
After:
- Firefox's button positions didn't change at all
- All buttons are aligned at the same level, across all browsers