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) {