|
|
@@ -1081,6 +1081,7 @@ export const updateBoundElements = (
|
|
|
options?: {
|
|
|
simultaneouslyUpdated?: readonly ExcalidrawElement[];
|
|
|
changedElements?: Map<string, ExcalidrawElement>;
|
|
|
+ indirectArrowUpdate?: boolean;
|
|
|
},
|
|
|
) => {
|
|
|
if (!isBindableElement(changedElement)) {
|
|
|
@@ -1100,7 +1101,7 @@ export const updateBoundElements = (
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- boundElementsVisitor(elementsMap, changedElement, (element) => {
|
|
|
+ const visitor = (element: ExcalidrawElement | undefined) => {
|
|
|
if (!isArrowElement(element) || element.isDeleted) {
|
|
|
return;
|
|
|
}
|
|
|
@@ -1172,7 +1173,14 @@ export const updateBoundElements = (
|
|
|
if (boundText && !boundText.isDeleted) {
|
|
|
handleBindTextResize(element, scene, false);
|
|
|
}
|
|
|
- });
|
|
|
+ };
|
|
|
+
|
|
|
+ boundElementsVisitor(elementsMap, changedElement, visitor);
|
|
|
+
|
|
|
+ if (options?.indirectArrowUpdate) {
|
|
|
+ boundElementsVisitor(elementsMap, changedElement, visitor);
|
|
|
+ boundElementsVisitor(elementsMap, changedElement, visitor);
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
const updateArrowBindings = (
|