mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-11-16 18:54:34 +01:00
@@ -697,10 +697,37 @@ const getBindingStrategyForDraggingBindingElementEndpoints_simple = (
|
|||||||
) || globalPoint,
|
) || globalPoint,
|
||||||
}
|
}
|
||||||
: { mode: null };
|
: { mode: null };
|
||||||
|
const otherBindableElement = otherBinding
|
||||||
|
? (elementsMap.get(
|
||||||
|
otherBinding.elementId,
|
||||||
|
) as NonDeleted<ExcalidrawBindableElement>)
|
||||||
|
: undefined;
|
||||||
|
const otherPoint = LinearElementEditor.getPointAtIndexGlobalCoordinates(
|
||||||
|
arrow,
|
||||||
|
startDragged ? -1 : 0,
|
||||||
|
elementsMap,
|
||||||
|
);
|
||||||
|
const other: BindingStrategy =
|
||||||
|
opts?.newArrow &&
|
||||||
|
otherBindableElement &&
|
||||||
|
!isPointInElement(otherPoint, otherBindableElement, elementsMap)
|
||||||
|
? {
|
||||||
|
mode: "orbit",
|
||||||
|
element: otherBindableElement,
|
||||||
|
focusPoint:
|
||||||
|
projectFixedPointOntoDiagonal(
|
||||||
|
arrow,
|
||||||
|
otherPoint,
|
||||||
|
otherBindableElement,
|
||||||
|
startDragged ? "end" : "start",
|
||||||
|
elementsMap,
|
||||||
|
) || otherPoint,
|
||||||
|
}
|
||||||
|
: { mode: undefined };
|
||||||
|
|
||||||
return {
|
return {
|
||||||
start: startDragged ? current : start,
|
start: startDragged ? current : other,
|
||||||
end: endDragged ? current : end,
|
end: endDragged ? current : other,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user