Skip to content

Virtual whiteboard for sketching hand-drawn like diagrams

fix: Other binding converted from fixed to orbit unconditionally (#10748)

Márk Tolmácsb43260d97be0
diff --git a/packages/element/src/binding.ts b/packages/element/src/binding.ts
index c763b6e21f..afc67d7afd 100644
--- a/packages/element/src/binding.ts
+++ b/packages/element/src/binding.ts
@@ -810,10 +810,13 @@ const getBindingStrategyForDraggingBindingElementEndpoints_simple = (
elementsMap,
);
- const other: BindingStrategy =
- otherBindableElement &&
- !otherFocusPointIsInElement &&
- appState.selectedLinearElement?.initialState.altFocusPoint
+ const otherNeverOverride = opts?.newArrow
+ ? appState.selectedLinearElement?.initialState.arrowStartIsInside
+ : otherBinding?.mode === "inside";
+ const other: BindingStrategy = !otherNeverOverride
+ ? otherBindableElement &&
+ !otherFocusPointIsInElement &&
+ appState.selectedLinearElement?.initialState.altFocusPoint
? {
mode: "orbit",
element: otherBindableElement,
@@ -832,7 +835,8 @@ const getBindingStrategyForDraggingBindingElementEndpoints_simple = (
elementsMap,
) || otherEndpoint,
}
- : { mode: undefined };
+ : { mode: undefined }
+ : { mode: undefined };
return {
start: startDragged ? current : other,
diff --git a/packages/excalidraw/components/App.tsx b/packages/excalidraw/components/App.tsx
index fa9a02b492..88871adde2 100644
--- a/packages/excalidraw/components/App.tsx
+++ b/packages/excalidraw/components/App.tsx
@@ -8743,6 +8743,7 @@ class App extends React.Component<AppProps, AppState> {
selectedPointsIndices: [endIdx],
initialState: {
...linearElementEditor.initialState,
+ arrowStartIsInside: event.altKey,
lastClickedPoint: endIdx,
origin: pointFrom<GlobalPoint>(
pointerDownState.origin.x,