fix: Point click arrow creation jumping to orbit

Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
This commit is contained in:
Mark Tolmacs
2025-11-12 19:33:00 +01:00
parent 2bb3a8aab0
commit 6270516ef0
2 changed files with 1 additions and 10 deletions

View File

@@ -671,11 +671,6 @@ const getBindingStrategyForDraggingBindingElementEndpoints_simple = (
otherBindableElement,
elementsMap,
);
// const otherPoint = LinearElementEditor.getPointAtIndexGlobalCoordinates(
// arrow,
// startDragged ? -1 : 0,
// elementsMap,
// );
const otherFocusPointIsInElement =
otherBindableElement &&
otherFocusPoint &&
@@ -683,11 +678,6 @@ const getBindingStrategyForDraggingBindingElementEndpoints_simple = (
// Handle outside-outside binding to the same element
if (otherBinding && otherBinding.elementId === hit?.id) {
// const [startFixedPoint, endFixedPoint] = getGlobalFixedPoints(
// arrow,
// elementsMap,
// );
invariant(
!opts?.newArrow || appState.selectedLinearElement?.initialState.origin,
"appState.selectedLinearElement.initialState.origin must be defined for new arrows",

View File

@@ -392,6 +392,7 @@ export class LinearElementEditor {
// PERF: Avoid state updates if not absolutely necessary
if (
app.state.selectedLinearElement?.customLineAngle === customLineAngle &&
linearElementEditor.initialState.altFocusPoint &&
(!suggestedBinding ||
isShallowEqual(app.state.suggestedBinding ?? [], suggestedBinding))
) {