Fix textbox element bindings on size changes (#2145)

Co-authored-by: dwelle <luzar.david@gmail.com>
This commit is contained in:
Mohamed Saleh 2020-09-08 12:03:49 -04:00 committed by GitHub
parent f2401c9163
commit 9cac7816cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -1683,6 +1683,9 @@ class App extends React.Component<ExcalidrawProps, AppState> {
}, },
onChange: withBatchedUpdates((text) => { onChange: withBatchedUpdates((text) => {
updateElement(text); updateElement(text);
if (isNonDeletedElement(element)) {
updateBoundElements(element);
}
}), }),
onSubmit: withBatchedUpdates((text) => { onSubmit: withBatchedUpdates((text) => {
const isDeleted = !text.trim(); const isDeleted = !text.trim();

View File

@ -88,6 +88,7 @@ export const transformElements = (
pointerX, pointerX,
pointerY, pointerY,
); );
updateBoundElements(element);
} else if (transformHandleType) { } else if (transformHandleType) {
resizeSingleElement( resizeSingleElement(
element, element,