From 4ee2c9650314e9ce819e2790c73ee27669a7312c Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Mon, 28 Oct 2013 12:34:35 +0100 Subject: [PATCH] Round the scale value displayed by the viewBookmark button to two decimal places --- web/viewer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/viewer.js b/web/viewer.js index 3f8056cef..9b78a50c9 100644 --- a/web/viewer.js +++ b/web/viewer.js @@ -1745,8 +1745,8 @@ function updateViewarea() { var currentScale = PDFView.currentScale; var currentScaleValue = PDFView.currentScaleValue; - var normalizedScaleValue = currentScaleValue == currentScale ? - currentScale * 100 : currentScaleValue; + var normalizedScaleValue = currentScaleValue === currentScale ? + Math.round(currentScale * 10000) / 100 : currentScaleValue; var pageNumber = firstPage.id; var pdfOpenParams = '#page=' + pageNumber;