diff --git a/css/style.css b/css/style.css index 17d2f3c..1d80cb2 100644 --- a/css/style.css +++ b/css/style.css @@ -3422,13 +3422,15 @@ a.ms1-trad-link.btn-aide-trad{ overflow:hidden; border-radius:6px; background:#111; - /* Mode carre, comme le lecteur QR (taille d'avant le polish qui cassait la lecture). */ + /* MSIN-4401 — Plus grand carre possible dans le viewport telephone. */ aspect-ratio:1 / 1; - width:100%; - max-width:360px; + width:min(100%, 92vw, 70vh); + max-width:min(100%, 92vw, 70vh); + max-height:70vh; margin:0 auto; cursor:pointer; outline:none; + scroll-margin:20px; } .inscr-gestion-bib-scan-capture.is-ready{ @@ -3492,7 +3494,7 @@ a.ms1-trad-link.btn-aide-trad{ .inscr-gestion-bib-scan-hint{ text-align:center; - max-width:360px; + max-width:min(100%, 92vw, 70vh); margin-left:auto; margin-right:auto; } @@ -4070,7 +4072,8 @@ a.ms1-trad-link.btn-aide-trad{ /* Apercu camera OCR (carre) un peu plus grand sur la fiche pour viser facilement. */ .inscr-gestion-fiche-section--editable .inscr-gestion-bib-scan-capture{ - max-width:420px; + /* Meme plafond viewport que la recherche (pas un petit 420px). */ + max-width:min(100%, 92vw, 70vh); } @keyframes inscr-gestion-statut-shake{ diff --git a/js/v2/inscr-gestion.js b/js/v2/inscr-gestion.js index ee3c187..be2379e 100644 --- a/js/v2/inscr-gestion.js +++ b/js/v2/inscr-gestion.js @@ -764,6 +764,18 @@ }); }; + BibScanSession.prototype.scrollCaptureIntoView = function () { + var el = this.captureEl || this.panel; + if (!el || !el.scrollIntoView) { + return; + } + try { + el.scrollIntoView({behavior: 'smooth', block: 'center', inline: 'nearest'}); + } catch (eScroll) { + el.scrollIntoView(true); + } + }; + BibScanSession.prototype.start = function () { var self = this; if (!self.panel || !navigator.mediaDevices || !navigator.mediaDevices.getUserMedia) { @@ -779,6 +791,13 @@ self.toggleBtn.setAttribute('aria-expanded', 'true'); self.toggleBtn.classList.add('is-active'); } + // MSIN-4401 — Centrer le viseur dans l'ecran (evite la moitie hors viewport). + self.scrollCaptureIntoView(); + window.setTimeout(function () { + if (activeScan === self) { + self.scrollCaptureIntoView(); + } + }, 120); self.setStatus(scanMsg(self.panel, 'data-msg-loading', 'Initialisation (1re fois)...', 'Initializing (first time)...'), true); var cameraPromise = navigator.mediaDevices.getUserMedia({ @@ -808,6 +827,8 @@ } self.bindCapture(); self.showReady(); + // Apres affichage video : recentrer (layout final). + self.scrollCaptureIntoView(); }).catch(function () { self.setStatus(scanMsg(self.panel, 'data-msg-camera', 'Impossible d\'accéder à la caméra.', 'Unable to access the camera.'), false); self.stop(); diff --git a/php/inc_settings.php b/php/inc_settings.php index 33b98ae..d740d43 100644 --- a/php/inc_settings.php +++ b/php/inc_settings.php @@ -7,7 +7,7 @@ * Constantes * * **************/ -define('_VERSION_CODE', '4.72.794'); +define('_VERSION_CODE', '4.72.795'); define('_DATE_CODE', '2026-07-13'); //MSIN-4290 define('QR_SECRET_KEY', 'ms1_qr_2026_cle_secrete_longue_et_fixe');