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
|
* @typedef UpdateUIToolbarParameters
|
||||||
* @property {number} pageNumber
|
* @property {number} pageNumber
|
||||||
* @property {string} scaleValue
|
* @property {string} scaleValue
|
||||||
* @property {scale} scale
|
* @property {number} scale
|
||||||
* @property {boolean} resetNumPages
|
* @property {boolean} resetNumPages
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1262,8 +1262,8 @@ var PDFViewerApplication = {
|
||||||
toolbarConfig.firstPage.disabled = (pageNumber <= 1);
|
toolbarConfig.firstPage.disabled = (pageNumber <= 1);
|
||||||
toolbarConfig.lastPage.disabled = (pageNumber >= pagesCount);
|
toolbarConfig.lastPage.disabled = (pageNumber >= pagesCount);
|
||||||
|
|
||||||
toolbarConfig.zoomOut.disabled = (scale === MIN_SCALE);
|
toolbarConfig.zoomOut.disabled = (scale <= MIN_SCALE);
|
||||||
toolbarConfig.zoomIn.disabled = (scale === MAX_SCALE);
|
toolbarConfig.zoomIn.disabled = (scale >= MAX_SCALE);
|
||||||
|
|
||||||
selectScaleOption(scaleValue, scale);
|
selectScaleOption(scaleValue, scale);
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue