fix(builder): calcular alto free-drag con posicion real y evitar desorden visual

This commit is contained in:
komkida91
2026-03-01 14:48:23 +01:00
parent 864846da0f
commit 9cccbab1c8

View File

@@ -1760,7 +1760,10 @@ const state = {
let maxBottom = 700;
inner.querySelectorAll(".block").forEach((node)=>{
const n = node;
maxBottom = Math.max(maxBottom, n.offsetTop + n.offsetHeight + 120);
const blockId = n.dataset.blockId;
const source = state.blocks.find((b)=>b && b.id === blockId);
const y = Number(source?.pos?.y || 0);
maxBottom = Math.max(maxBottom, y + n.offsetHeight + 140);
});
freeDragBottom = maxBottom;
canvas.style.minHeight = maxBottom + "px";