mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 17:30:09 +02:00
A few small tweaks of the SecondaryToolbar code
This commit is contained in:
parent
26fb376b65
commit
bee1b734c2
2 changed files with 12 additions and 12 deletions
|
@ -138,8 +138,10 @@ var PDFView = {
|
|||
|
||||
SecondaryToolbar.initialize({
|
||||
toolbar: document.getElementById('secondaryToolbar'),
|
||||
presentationMode: PresentationMode,
|
||||
toggleButton: document.getElementById('secondaryToolbarToggle'),
|
||||
presentationMode: document.getElementById('secondaryPresentationMode'),
|
||||
presentationModeButton:
|
||||
document.getElementById('secondaryPresentationMode'),
|
||||
openFile: document.getElementById('secondaryOpenFile'),
|
||||
print: document.getElementById('secondaryPrint'),
|
||||
download: document.getElementById('secondaryDownload'),
|
||||
|
@ -1918,7 +1920,7 @@ window.addEventListener('DOMMouseScroll', function(evt) {
|
|||
|
||||
window.addEventListener('click', function click(evt) {
|
||||
if (!PresentationMode.active) {
|
||||
if (SecondaryToolbar.isOpen && PDFView.container.contains(evt.target)) {
|
||||
if (SecondaryToolbar.opened && PDFView.container.contains(evt.target)) {
|
||||
SecondaryToolbar.close();
|
||||
}
|
||||
} else if (evt.button === 0) {
|
||||
|
@ -2037,7 +2039,7 @@ window.addEventListener('keydown', function keydown(evt) {
|
|||
handled = true;
|
||||
break;
|
||||
case 27: // esc key
|
||||
if (SecondaryToolbar.isOpen) {
|
||||
if (SecondaryToolbar.opened) {
|
||||
SecondaryToolbar.close();
|
||||
handled = true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue