From 9ee47731c9a61b20dc5d2cc061f9ed947c57c037 Mon Sep 17 00:00:00 2001 From: xiaoqidun Date: Mon, 26 Oct 2026 22:23:24 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=BC=96=E8=BE=91=E8=83=BD=E5=8A=9B):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8D=95=E5=AD=97=E7=BC=96=E8=BE=91=E6=A1=86?= =?UTF-8?q?=E5=A4=9A=E4=BD=99=E7=95=99=E7=99=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/webui/ofdgo_edit.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/webui/ofdgo_edit.js b/assets/webui/ofdgo_edit.js index e44fc46..bd9ae32 100644 --- a/assets/webui/ofdgo_edit.js +++ b/assets/webui/ofdgo_edit.js @@ -1812,7 +1812,7 @@ export class CanvasEditor { position += text.length + 1; } input.replaceChildren(fragment); - Object.assign(input.style, { width: "max-content", height: "auto", minWidth: `${(editing.style?.size || editing.item.size) * PX_PER_MM * sourceTextScale(editing) + 4}px` }); + Object.assign(input.style, { width: "max-content", height: "auto", minWidth: value ? "0px" : `${(editing.style?.size || editing.item.size) * PX_PER_MM * sourceTextScale(editing) + 4}px` }); restoreTextSelection(positions, caret, editing.range); } @@ -1901,7 +1901,7 @@ export class CanvasEditor { input.replaceChildren(fragment); const [a, b, c, d, e, f] = frame.matrix.map((value, index) => index < 4 ? value / displayScale : value); Object.assign(input.style, { - width: `${Math.max(size, right - left) + 4}px`, + width: `${right - left + 4}px`, minWidth: "0px", minHeight: "0px", height: `${bottom - top + 4}px`, transform: `matrix(${a},${b},${c},${d},${e * PX_PER_MM + a * left + c * top},${f * PX_PER_MM + b * left + d * top})`, });