mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-04-14 16:40:58 -04:00
When dragging arrow endpoint, update binding only on the dragged side
This commit is contained in:
parent
dff69e9191
commit
427ad41fad
1 changed files with 4 additions and 20 deletions
|
@ -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];
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue