mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-29 13:56:32 +08:00
1 parent
4fee3dfd8e
commit
9ee47731c9
1 file changed
+2
-2
@@ -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})`,
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user