mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-08-19 16:27:04 +02:00
Binding tests updated
This commit is contained in:
@@ -408,19 +408,13 @@ const bindingStrategyForNewSimpleArrowEndpointDragging = (
|
||||
const otherIsInsideBinding =
|
||||
!!appState.selectedLinearElement?.pointerDownState.arrowStartIsInside;
|
||||
|
||||
// We need to "jump" the start point out with the detached
|
||||
// focus point of the center of the bound element
|
||||
invariant(
|
||||
arrowOriginalStartPoint,
|
||||
"Arrow original start point must be defined",
|
||||
);
|
||||
const other: BindingStrategy = {
|
||||
mode: otherIsInsideBinding ? "inside" : "orbit",
|
||||
element: otherElement,
|
||||
focusPoint: snapToCenter(
|
||||
otherElement,
|
||||
elementsMap,
|
||||
arrowOriginalStartPoint,
|
||||
arrowOriginalStartPoint ?? pointFrom<GlobalPoint>(arrow.x, arrow.y),
|
||||
),
|
||||
};
|
||||
|
||||
|
@@ -222,7 +222,19 @@ const rotateSingleElement = (
|
||||
}
|
||||
const boundTextElementId = getBoundTextElementId(element);
|
||||
|
||||
scene.mutateElement(element, { angle });
|
||||
let update: ElementUpdate<NonDeletedExcalidrawElement> = {
|
||||
angle,
|
||||
};
|
||||
|
||||
if (isBindingElement(element)) {
|
||||
update = {
|
||||
...update,
|
||||
startBinding: null,
|
||||
endBinding: null,
|
||||
} as ElementUpdate<ExcalidrawArrowElement>;
|
||||
}
|
||||
|
||||
scene.mutateElement(element, update);
|
||||
if (boundTextElementId) {
|
||||
const textElement =
|
||||
scene.getElement<ExcalidrawTextElementWithContainer>(boundTextElementId);
|
||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user