From 93f4f7a6499524a068d2bfcea4d3a9db4476cab4 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Tue, 18 Aug 2015 12:54:08 +0200 Subject: [PATCH] Use `DEFAULT_SCALE` instead of `1.0` as the default value if the `scale` option isn't specified when initializing `PDFPageView` A small piece of cleanup, in order to avoid unnecessarily hardcoding a default value. --- web/pdf_page_view.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/pdf_page_view.js b/web/pdf_page_view.js index 021fe7f4a..3f1a30c27 100644 --- a/web/pdf_page_view.js +++ b/web/pdf_page_view.js @@ -12,7 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* globals RenderingStates, PDFJS, CSS_UNITS, getOutputScale, +/* globals RenderingStates, PDFJS, DEFAULT_SCALE, CSS_UNITS, getOutputScale, TextLayerBuilder, AnnotationsLayerBuilder, Promise, approximateFraction, roundToDivide */ @@ -55,7 +55,7 @@ var PDFPageView = (function PDFPageViewClosure() { this.renderingId = 'page' + id; this.rotation = 0; - this.scale = scale || 1.0; + this.scale = scale || DEFAULT_SCALE; this.viewport = defaultViewport; this.pdfPageRotate = defaultViewport.rotation; this.hasRestrictedScaling = false;