Change default scale to .75 for mobile PDF viewing

This commit is contained in:
Benjamin Beganović 2021-03-03 08:51:10 +01:00
parent 1cfe5611be
commit fe2bfc3c84

View File

@ -15,7 +15,7 @@ class PDF {
this.context = canvas.getContext('2d');
this.currentPage = 1;
this.maxPages = 1;
this.currentScale = 1.75;
this.currentScale = 0.75;
this.currentScaleText = document.getElementById('zoom-level');
if (matchMedia('only screen and (max-width: 480px)').matches) {
@ -125,7 +125,7 @@ class PDF {
}
}
const url = document.querySelector("meta[name='pdf-url'").content;
const url = document.querySelector("meta[name='pdf-url']").content;
const canvas = document.getElementById('pdf-placeholder');
new PDF(url, canvas).prepare().handle();