1
0
mirror of https://github.com/24eme/signaturepdf.git synced 2023-08-25 09:33:08 +02:00

Resize qui si la largeur à changé

This commit is contained in:
Vincent LAURENT 2021-10-10 00:56:46 +02:00
parent 45462e4ed9
commit 3c0633f1f4

View File

@ -389,7 +389,12 @@ loadingTask.promise.then(function(pdf) {
});
}
var resizeTimeout;
var windowWidth = window.innerWidth;
window.addEventListener('resize', function(event) {
if(windowWidth == window.innerWidth) {
return;
}
windowWidth = window.innerWidth;
is_mobile = !(window.getComputedStyle(document.getElementById('is_mobile')).display === "none");
if(is_mobile) {
menu.classList.remove('show');