From 5b2f2508abd98a3a90edeb173bfbef378caaffc3 Mon Sep 17 00:00:00 2001 From: ausboss <102309304+ausboss@users.noreply.github.com> Date: Tue, 29 Sep 2026 21:40:07 -0500 Subject: [PATCH] Preview and padlock: two leftovers after the first pass - A node dragged taller while its preview was off keeps that height when the preview comes back. - A new picture with no ratio lit starts with the padlock off, as the untouched picture has no shape to hold. --- js/input_preview/index.js | 2 +- js/shared/transform_editor.mjs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/js/input_preview/index.js b/js/input_preview/index.js index f091fd6..0dcbd85 100644 --- a/js/input_preview/index.js +++ b/js/input_preview/index.js @@ -275,7 +275,7 @@ function syncPreviewMode(state, resize) { // On: back to the height it had, with the last result in it. const before = Number(node.properties[HEIGHT_PROPERTY]); delete node.properties[HEIGHT_PROPERTY]; - const height = Math.max(floor, Number.isFinite(before) ? before : 0); + const height = Math.max(floor, Number.isFinite(before) ? before : 0, Number(node.size?.[1]) || 0); node.setSize?.([node.size?.[0] ?? PANEL_MIN_WIDTH, height]); } node.setDirtyCanvas?.(true, true); diff --git a/js/shared/transform_editor.mjs b/js/shared/transform_editor.mjs index a56d695..06b00d7 100644 --- a/js/shared/transform_editor.mjs +++ b/js/shared/transform_editor.mjs @@ -1242,6 +1242,9 @@ function refitAspect(state) { state.refitTo = null; if (aspect) fitAspect(state, aspect, aspectMode(state)); else if (state.node.properties) delete state.node.properties.ausboss_fit_aspect; + // A new picture with no ratio lit is back to Source: a lock left from the + // old one would hold nothing. + settleRequest(state); } async function loadSource(state) {