From c855a525061fff1af7e1884c3d5154aeae164460 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Wed, 29 Jul 2020 16:36:27 +0200 Subject: [PATCH] Down the scale factor to 0.5 for mobile devices --- resources/js/clients/shared/pdf.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/resources/js/clients/shared/pdf.js b/resources/js/clients/shared/pdf.js index fa31edabfefc..d1b5eaeea985 100644 --- a/resources/js/clients/shared/pdf.js +++ b/resources/js/clients/shared/pdf.js @@ -17,6 +17,12 @@ class PDF { this.maxPages = 1; this.currentScale = 1.75; this.currentScaleText = document.getElementById('zoom-level'); + + if (matchMedia('only screen and (max-width: 480px)').matches) { + this.currentScale = 1; + } + + this.currentScaleText.textContent = this.currentScale * 100 + '%'; } handlePreviousPage() {