mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-18 06:50:31 +02:00
fix(binding): Harmonize binding param usage
This commit is contained in:
@@ -233,12 +233,18 @@ const rotateSingleElement = (
|
|||||||
if (isBindingElement(element)) {
|
if (isBindingElement(element)) {
|
||||||
update = {
|
update = {
|
||||||
...update,
|
...update,
|
||||||
startBinding: null,
|
|
||||||
endBinding: null,
|
|
||||||
} as ElementUpdate<ExcalidrawArrowElement>;
|
} as ElementUpdate<ExcalidrawArrowElement>;
|
||||||
|
|
||||||
|
if (element.startBinding) {
|
||||||
|
unbindBindingElement(element, "start", scene);
|
||||||
|
}
|
||||||
|
if (element.endBinding) {
|
||||||
|
unbindBindingElement(element, "end", scene);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
scene.mutateElement(element, update);
|
scene.mutateElement(element, update);
|
||||||
|
|
||||||
if (boundTextElementId) {
|
if (boundTextElementId) {
|
||||||
const textElement =
|
const textElement =
|
||||||
scene.getElement<ExcalidrawTextElementWithContainer>(boundTextElementId);
|
scene.getElement<ExcalidrawTextElementWithContainer>(boundTextElementId);
|
||||||
@@ -867,8 +873,11 @@ export const resizeSingleElement = (
|
|||||||
if (latestElement.startBinding) {
|
if (latestElement.startBinding) {
|
||||||
updates = {
|
updates = {
|
||||||
...updates,
|
...updates,
|
||||||
startBinding: null,
|
|
||||||
} as ElementUpdate<ExcalidrawArrowElement>;
|
} as ElementUpdate<ExcalidrawArrowElement>;
|
||||||
|
|
||||||
|
if (latestElement.startBinding) {
|
||||||
|
unbindBindingElement(latestElement, "start", scene);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (latestElement.endBinding) {
|
if (latestElement.endBinding) {
|
||||||
|
Reference in New Issue
Block a user