mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -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,
|
zoom,
|
||||||
)
|
)
|
||||||
: null // If binding is disabled and start is dragged, break all binds
|
: 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
|
"keep";
|
||||||
getElligibleElementForBindingElement(
|
|
||||||
selectedElement,
|
|
||||||
"start",
|
|
||||||
elementsMap,
|
|
||||||
elements,
|
|
||||||
zoom,
|
|
||||||
)
|
|
||||||
: "keep";
|
|
||||||
const end = endDragged
|
const end = endDragged
|
||||||
? isBindingEnabled
|
? isBindingEnabled
|
||||||
? getElligibleElementForBindingElement(
|
? getElligibleElementForBindingElement(
|
||||||
|
@ -304,16 +296,8 @@ const getBindingStrategyForDraggingArrowEndpoints = (
|
||||||
zoom,
|
zoom,
|
||||||
)
|
)
|
||||||
: null // If binding is disabled and end is dragged, break all binds
|
: 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
|
"keep";
|
||||||
getElligibleElementForBindingElement(
|
|
||||||
selectedElement,
|
|
||||||
"end",
|
|
||||||
elementsMap,
|
|
||||||
elements,
|
|
||||||
zoom,
|
|
||||||
)
|
|
||||||
: "keep";
|
|
||||||
|
|
||||||
return [start, end];
|
return [start, end];
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue