Wizard DXF: correzioni revisione zoom anteprime (style statico, x-show, altezza utile). Refs #113

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-28 12:39:06 +01:00
parent 45c9e6c3f3
commit 04b81ad2f2
4 changed files with 25 additions and 13 deletions
@@ -514,7 +514,9 @@ function dxfRecipeWizard(taskId, csrf, msgs) {
vFit(k) {
const vp = this._vpEl(k), v = this.views[k];
if (!vp || !v.w || !v.h || !vp.clientWidth) return; // nascosto o vuoto: niente
let z = Math.min(vp.clientWidth / v.w, 240 / v.h);
// altezza utile del viewport (senza bordo), ripiego 240; con 240 secco il contenuto sborda e compare lo scroll
const ch = vp.clientHeight || 240;
let z = Math.min(vp.clientWidth / v.w, ch / v.h);
if (k === 'img') z = Math.min(8, Math.max(0.05, z));
v.zoom = z;
v.fit = z;