From de91f092a720553c83889d32d10a27834f23e450 Mon Sep 17 00:00:00 2001 From: Mark Tolmacs Date: Wed, 23 Apr 2025 16:08:22 +0200 Subject: [PATCH] Remove elbow arrow snap incorrect optimization Signed-off-by: Mark Tolmacs --- packages/element/src/elbowArrow.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/packages/element/src/elbowArrow.ts b/packages/element/src/elbowArrow.ts index 83d48b1f55..4e15fcae60 100644 --- a/packages/element/src/elbowArrow.ts +++ b/packages/element/src/elbowArrow.ts @@ -22,8 +22,6 @@ import { isDevEnv, } from "@excalidraw/common"; -import { isPointInShape } from "@excalidraw/utils/collision"; - import type { AppState } from "@excalidraw/excalidraw/types"; import { @@ -55,7 +53,7 @@ import { type NonDeletedSceneElementsMap, } from "./types"; -import { aabbForElement, getElementShape, pointInsideBounds } from "./shapes"; +import { aabbForElement, pointInsideBounds } from "./shapes"; import type { Bounds } from "./bounds"; import type { Heading } from "./heading"; @@ -2222,10 +2220,7 @@ const getGlobalPoint = ( zoom?: AppState["zoom"], ): GlobalPoint => { if (isDragging) { - if ( - element && - isPointInShape(initialPoint, getElementShape(element, elementsMap)) - ) { + if (element) { const snapPoint = bindPointToSnapToElementOutline( arrow, element,