fix: Bound arrow elements for distribute and wyswig updates (#10702)
* fix: update distributeElements to updateBoundElements Co-authored-by: Anvi Kudaraya <anvikudaraya417@gmail.com> * fix: apply updateBoundElements when bound text extends past container height Co-authored-by: Anvi Kudaraya <anvikudaraya417@gmail.com> --------- Co-authored-by: Anvi Kudaraya <anvikudaraya417@gmail.com>
This commit is contained in:
co-authored by
Anvi Kudaraya
parent
60759d314d
commit
28691e14b1
@@ -58,6 +58,7 @@ const distributeSelectedElements = (
|
||||
app.scene.getNonDeletedElementsMap(),
|
||||
distribution,
|
||||
appState,
|
||||
app.scene,
|
||||
);
|
||||
|
||||
const updatedElementsMap = arrayToMap(updatedElements);
|
||||
|
||||
@@ -14,6 +14,7 @@ import {
|
||||
|
||||
import {
|
||||
originalContainerCache,
|
||||
updateBoundElements,
|
||||
updateOriginalContainerCache,
|
||||
} from "@excalidraw/element";
|
||||
|
||||
@@ -208,6 +209,7 @@ export const textWysiwyg = ({
|
||||
);
|
||||
|
||||
app.scene.mutateElement(container, { height: targetContainerHeight });
|
||||
updateBoundElements(container, app.scene);
|
||||
return;
|
||||
} else if (
|
||||
// autoshrink container height until original container height
|
||||
@@ -221,6 +223,7 @@ export const textWysiwyg = ({
|
||||
container.type,
|
||||
);
|
||||
app.scene.mutateElement(container, { height: targetContainerHeight });
|
||||
updateBoundElements(container, app.scene);
|
||||
} else {
|
||||
const { x, y } = computeBoundTextPosition(
|
||||
container,
|
||||
|
||||
Reference in New Issue
Block a user