1
0
Fork 0
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:
Tim van der Meij 2016-08-31 15:33:49 +02:00 committed by GitHub
commit 23b13d368e

View file

@ -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);
},