When dragging arrow endpoint, update binding only on the dragged side

This commit is contained in:
Narek Malkhasyan 2025-04-10 08:07:57 +04:00
parent dff69e9191
commit 427ad41fad

View file

@ -284,16 +284,8 @@ const getBindingStrategyForDraggingArrowEndpoints = (
zoom,
)
: null // If binding is disabled and start is dragged, break all binds
: !isElbowArrow(selectedElement)
? // We have to update the focus and gap of the binding, so let's rebind
getElligibleElementForBindingElement(
selectedElement,
"start",
elementsMap,
elements,
zoom,
)
: "keep";
:
"keep";
const end = endDragged
? isBindingEnabled
? getElligibleElementForBindingElement(
@ -304,16 +296,8 @@ const getBindingStrategyForDraggingArrowEndpoints = (
zoom,
)
: null // If binding is disabled and end is dragged, break all binds
: !isElbowArrow(selectedElement)
? // We have to update the focus and gap of the binding, so let's rebind
getElligibleElementForBindingElement(
selectedElement,
"end",
elementsMap,
elements,
zoom,
)
: "keep";
:
"keep";
return [start, end];
};