diff --git a/packages/element/src/__tests__/__snapshots__/transform.test.ts.snap b/packages/element/src/__tests__/__snapshots__/transform.test.ts.snap index afef25eeff..7961f1e68e 100644 --- a/packages/element/src/__tests__/__snapshots__/transform.test.ts.snap +++ b/packages/element/src/__tests__/__snapshots__/transform.test.ts.snap @@ -244,7 +244,7 @@ exports[`Test Transform > Test arrow bindings > should bind arrows to existing t "backgroundColor": "transparent", "boundElements": [ { - "id": "id50", + "id": "id6", "type": "arrow", }, ], @@ -290,7 +290,7 @@ exports[`Test Transform > Test arrow bindings > should bind arrows to existing t "backgroundColor": "transparent", "boundElements": [ { - "id": "id50", + "id": "id6", "type": "arrow", }, ], @@ -335,7 +335,7 @@ exports[`Test Transform > Test arrow bindings > should bind arrows to existing t "backgroundColor": "transparent", "boundElements": [ { - "id": "id51", + "id": "id7", "type": "text", }, ], @@ -401,7 +401,7 @@ exports[`Test Transform > Test arrow bindings > should bind arrows to existing t "autoResize": true, "backgroundColor": "transparent", "boundElements": null, - "containerId": "id50", + "containerId": "id6", "customData": undefined, "fillStyle": "solid", "fontFamily": 5, @@ -1316,7 +1316,7 @@ exports[`Test Transform > should transform the elements correctly when linear el "backgroundColor": "transparent", "boundElements": [ { - "id": "id56", + "id": "id11", "type": "text", }, { @@ -1359,7 +1359,7 @@ exports[`Test Transform > should transform the elements correctly when linear el "backgroundColor": "transparent", "boundElements": [ { - "id": "id57", + "id": "id12", "type": "text", }, ], @@ -1398,7 +1398,7 @@ exports[`Test Transform > should transform the elements correctly when linear el "backgroundColor": "transparent", "boundElements": [ { - "id": "id58", + "id": "id13", "type": "text", }, { @@ -1441,7 +1441,7 @@ exports[`Test Transform > should transform the elements correctly when linear el "backgroundColor": "transparent", "boundElements": [ { - "id": "id59", + "id": "id14", "type": "text", }, { @@ -1488,7 +1488,7 @@ exports[`Test Transform > should transform the elements correctly when linear el "backgroundColor": "transparent", "boundElements": [ { - "id": "id60", + "id": "id15", "type": "text", }, ], @@ -1556,7 +1556,7 @@ exports[`Test Transform > should transform the elements correctly when linear el "backgroundColor": "transparent", "boundElements": [ { - "id": "id61", + "id": "id16", "type": "text", }, ], diff --git a/packages/element/src/binding.ts b/packages/element/src/binding.ts index 566ef3c4e4..3cbaea93e5 100644 --- a/packages/element/src/binding.ts +++ b/packages/element/src/binding.ts @@ -832,9 +832,15 @@ const getBindingStrategyForDraggingBindingElementEndpoints_simple = ( threshold: maxBindingDistance_simple(appState.zoom), overrideShouldTestInside: true, }); + const otherPointWasInsideAtStart = + !appState.selectedLinearElement?.initialState.altFocusPoint || + pointsEqual( + appState.selectedLinearElement.initialState.altFocusPoint, + otherEndpoint, + ); const otherNeverOverride = opts?.newArrow ? appState.selectedLinearElement?.initialState.arrowStartIsInside - : otherBinding?.mode === "inside"; + : otherBinding?.mode === "inside" && otherPointWasInsideAtStart; const other: BindingStrategy = !otherNeverOverride ? otherBindableElement && !otherFocusPointIsInElement &&