1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-05 19:42:38 +02:00

Remove unnecessary setTimeout calls for zoom adjustment in logo and favicon cropping

This commit is contained in:
Daniel Neto 2025-06-26 11:05:24 -03:00
parent da38e8f554
commit 549ba7c3ee

View file

@ -596,12 +596,7 @@ if (User::isAdmin()) {
reader.onload = function(e) { reader.onload = function(e) {
c.croppie('bind', { c.croppie('bind', {
url: e.target.result url: e.target.result
}).then(function() {
setTimeout(() => {
c.croppie('setZoom', 1);
}, 100);
}); });
} }
reader.readAsDataURL($(input)[0].files[0]); reader.readAsDataURL($(input)[0].files[0]);
@ -701,9 +696,6 @@ if (User::isAdmin()) {
height: 70 height: 70
} }
}); });
setTimeout(function() {
logoCrop.croppie('setZoom', 1);
}, 1000);
$('#favicon-result-btn').on('click', function(ev) { $('#favicon-result-btn').on('click', function(ev) {
@ -733,9 +725,6 @@ if (User::isAdmin()) {
height: 180 height: 180
} }
}); });
setTimeout(function() {
faviconCrop.croppie('setZoom', 1);
}, 1000);