mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 06:14:31 -04:00
Change default scale to .75 for mobile PDF viewing
This commit is contained in:
parent
1cfe5611be
commit
fe2bfc3c84
4
resources/js/clients/shared/pdf.js
vendored
4
resources/js/clients/shared/pdf.js
vendored
@ -15,7 +15,7 @@ class PDF {
|
|||||||
this.context = canvas.getContext('2d');
|
this.context = canvas.getContext('2d');
|
||||||
this.currentPage = 1;
|
this.currentPage = 1;
|
||||||
this.maxPages = 1;
|
this.maxPages = 1;
|
||||||
this.currentScale = 1.75;
|
this.currentScale = 0.75;
|
||||||
this.currentScaleText = document.getElementById('zoom-level');
|
this.currentScaleText = document.getElementById('zoom-level');
|
||||||
|
|
||||||
if (matchMedia('only screen and (max-width: 480px)').matches) {
|
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');
|
const canvas = document.getElementById('pdf-placeholder');
|
||||||
|
|
||||||
new PDF(url, canvas).prepare().handle();
|
new PDF(url, canvas).prepare().handle();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user