Complete z-related optimizations with documentation and enhanced error handling

Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2025-09-21 14:15:20 +00:00
parent 130b08090a
commit 1e97aa3f22
2 changed files with 68 additions and 1 deletions

View file

@ -34,9 +34,13 @@ export default class extends Controller {
console.log('Init Scanner');
// Configure ZXing WASM when scanner is actually used (optimization)
// This reduces initial app bundle size and improves startup performance
import('../../js/zxing_config').then(({ configureZXing }) => {
console.log('ZXing WASM configuration loaded on-demand');
configureZXing();
}).catch(console.error);
}).catch((error) => {
console.warn('Failed to load ZXing configuration:', error);
});
//This function ensures, that the qrbox is 70% of the total viewport
let qrboxFunction = function(viewfinderWidth, viewfinderHeight) {