diff --git a/src/frontend/flask_app/static/js/dxf_recipe_wizard.js b/src/frontend/flask_app/static/js/dxf_recipe_wizard.js
index cffa4db..eec8c60 100644
--- a/src/frontend/flask_app/static/js/dxf_recipe_wizard.js
+++ b/src/frontend/flask_app/static/js/dxf_recipe_wizard.js
@@ -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;
diff --git a/src/frontend/flask_app/templates/maker/task_editor.html b/src/frontend/flask_app/templates/maker/task_editor.html
index 140cb47..bfc985e 100644
--- a/src/frontend/flask_app/templates/maker/task_editor.html
+++ b/src/frontend/flask_app/templates/maker/task_editor.html
@@ -730,8 +730,8 @@
-
-
+
+
@@ -740,12 +740,12 @@
-
-
+
{# #113: tutto in :style, Alpine con stringa sostituisce l'attributo style #}
![]()
@@ -771,7 +771,7 @@
@pointerup="vPanEnd()" @pointercancel="vPanEnd()"
class="rounded border border-[var(--border-color)]"
:style="'overflow:auto;touch-action:none;user-select:none;display:flex;height:240px;background:var(--bg-primary);cursor:' + vCursor('dxf')">
-
+