fix(builder): calcular alto free-drag con posicion real y evitar desorden visual
This commit is contained in:
@@ -1760,7 +1760,10 @@ const state = {
|
|||||||
let maxBottom = 700;
|
let maxBottom = 700;
|
||||||
inner.querySelectorAll(".block").forEach((node)=>{
|
inner.querySelectorAll(".block").forEach((node)=>{
|
||||||
const n = 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;
|
freeDragBottom = maxBottom;
|
||||||
canvas.style.minHeight = maxBottom + "px";
|
canvas.style.minHeight = maxBottom + "px";
|
||||||
|
|||||||
Reference in New Issue
Block a user