mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix: update viewport coords correctly when editing text (#4416)
This commit is contained in:
parent
ff1d7728a0
commit
c2a8712593
2 changed files with 6 additions and 3 deletions
|
@ -426,10 +426,10 @@ export const textWysiwyg = ({
|
|||
if (isTextElement(updateElement) && updateElement.containerId) {
|
||||
if (editable.value) {
|
||||
mutateElement(updateElement, {
|
||||
y,
|
||||
y: y + appState.offsetTop,
|
||||
height: Number(editable.style.height.slice(0, -2)),
|
||||
width: Number(editable.style.width.slice(0, -2)),
|
||||
x,
|
||||
x: x + appState.offsetLeft,
|
||||
});
|
||||
const boundTextElementId = getBoundTextElementId(container);
|
||||
if (!boundTextElementId || boundTextElementId !== element.id) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue