mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Merge pull request #7579 from Snuffleupagus/updateUIToolbar-correctly-disable-zoom-buttons
Ensure that the zoom buttons are disabled correctly if the `scale` is smaller/larger than `MIN_SCALE/MAX_SCALE` in `PDFViewerApplication._updateUIToolbar`
This commit is contained in:
commit
23b13d368e
1 changed files with 3 additions and 3 deletions
|
@ -1211,7 +1211,7 @@ var PDFViewerApplication = {
|
|||
* @typedef UpdateUIToolbarParameters
|
||||
* @property {number} pageNumber
|
||||
* @property {string} scaleValue
|
||||
* @property {scale} scale
|
||||
* @property {number} scale
|
||||
* @property {boolean} resetNumPages
|
||||
*/
|
||||
|
||||
|
@ -1262,8 +1262,8 @@ var PDFViewerApplication = {
|
|||
toolbarConfig.firstPage.disabled = (pageNumber <= 1);
|
||||
toolbarConfig.lastPage.disabled = (pageNumber >= pagesCount);
|
||||
|
||||
toolbarConfig.zoomOut.disabled = (scale === MIN_SCALE);
|
||||
toolbarConfig.zoomIn.disabled = (scale === MAX_SCALE);
|
||||
toolbarConfig.zoomOut.disabled = (scale <= MIN_SCALE);
|
||||
toolbarConfig.zoomIn.disabled = (scale >= MAX_SCALE);
|
||||
|
||||
selectScaleOption(scaleValue, scale);
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue