fix: Lost focus point on transition to inside-inside

This commit is contained in:
Mark Tolmacs
2026-03-16 15:08:05 +00:00
parent c1082923ee
commit 84f087633e
2 changed files with 17 additions and 11 deletions
+7 -1
View File
@@ -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 &&