fix: when dragging arrow endpoint, update binding only on the dragged side (#9367)

This commit is contained in:
Narek Malkhasyan 2025-04-25 12:46:58 +04:00 committed by GitHub
parent a18b139a60
commit 2a0d15799c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 86 additions and 114 deletions

View file

@ -276,15 +276,6 @@ 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";
const end = endDragged
? isBindingEnabled
@ -296,15 +287,6 @@ 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";
return [start, end];