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
@ -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…
x
Reference in New Issue
Block a user