Browse Source

Move handling of the 'custom' scale value from pdf_viewer.js to viewer.js

The special handling of the 'custom' scale value is only relevant for the `scaleSelect` dropdown in the standard viewer, hence I think that it should be placed in `viewer.js` instead.
Jonas Jenwald 10 years ago
parent
commit
93d82e21d5
  1. 3
      web/pdf_viewer.js
  2. 3
      web/viewer.js

3
web/pdf_viewer.js

@ -415,9 +415,6 @@ var PDFViewer = (function pdfViewer() { @@ -415,9 +415,6 @@ var PDFViewer = (function pdfViewer() {
},
_setScale: function pdfViewer_setScale(value, noScroll) {
if (value === 'custom') {
return;
}
var scale = parseFloat(value);
if (scale > 0) {

3
web/viewer.js

@ -1440,6 +1440,9 @@ function webViewerInitialized() { @@ -1440,6 +1440,9 @@ function webViewerInitialized() {
});
document.getElementById('scaleSelect').addEventListener('change', function() {
if (this.value === 'custom') {
return;
}
PDFViewerApplication.pdfViewer.currentScaleValue = this.value;
});

Loading…
Cancel
Save