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
|
@ -1916,7 +1916,10 @@ class App extends React.Component<AppProps, AppState> {
|
|||
},
|
||||
this.state,
|
||||
);
|
||||
return [viewportX, viewportY];
|
||||
return [
|
||||
viewportX - this.state.offsetLeft,
|
||||
viewportY - this.state.offsetTop,
|
||||
];
|
||||
},
|
||||
onChange: withBatchedUpdates((text) => {
|
||||
updateElement(text, text, false, !element.containerId);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue