mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Merge pull request #5175 from Snuffleupagus/disable-first/last-page-buttons
Disable the "Go to First/Last Page" buttons when the first/last page is currently active
This commit is contained in:
commit
03fd24bde2
1 changed files with 6 additions and 1 deletions
|
@ -2211,8 +2211,13 @@ window.addEventListener('pagechange', function pagechange(evt) {
|
|||
}
|
||||
}
|
||||
}
|
||||
var numPages = PDFView.pages.length;
|
||||
|
||||
document.getElementById('previous').disabled = (page <= 1);
|
||||
document.getElementById('next').disabled = (page >= PDFView.pages.length);
|
||||
document.getElementById('next').disabled = (page >= numPages);
|
||||
|
||||
document.getElementById('firstPage').disabled = (page <= 1);
|
||||
document.getElementById('lastPage').disabled = (page >= numPages);
|
||||
}, true);
|
||||
|
||||
function handleMouseWheel(evt) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue