diff --git a/packages/excalidraw/actions/actionFinalize.tsx b/packages/excalidraw/actions/actionFinalize.tsx index 854ddf959..a168289b9 100644 --- a/packages/excalidraw/actions/actionFinalize.tsx +++ b/packages/excalidraw/actions/actionFinalize.tsx @@ -6,7 +6,6 @@ import { isValidPolygon, LinearElementEditor, newElementWith, - getHoveredElementForBinding, } from "@excalidraw/element"; import { @@ -229,21 +228,10 @@ export const actionFinalize = register({ element.type !== "freedraw" && appState.lastPointerDownWith !== "touch" ) { - const { x: rx, y: ry, points, lastCommittedPoint } = element; - const lastGlobalPoint = pointFrom( - rx + points[points.length - 1][0], - ry + points[points.length - 1][1], - ); - const hoveredElementForBinding = getHoveredElementForBinding( - lastGlobalPoint, - app.scene.getNonDeletedElements(), - elementsMap, - app.state.zoom, - ); + const { points, lastCommittedPoint } = element; if ( - !hoveredElementForBinding && - (!lastCommittedPoint || - points[points.length - 1] !== lastCommittedPoint) + !lastCommittedPoint || + points[points.length - 1] !== lastCommittedPoint ) { scene.mutateElement(element, { points: element.points.slice(0, -1), diff --git a/packages/excalidraw/components/App.tsx b/packages/excalidraw/components/App.tsx index 0854f550d..bec2e5c66 100644 --- a/packages/excalidraw/components/App.tsx +++ b/packages/excalidraw/components/App.tsx @@ -7975,7 +7975,7 @@ class App extends React.Component { // clicking inside commit zone → finalize arrow if ( - hoveredElementForBinding || + (isBindingElement(multiElement) && hoveredElementForBinding) || (multiElement.points.length > 1 && lastCommittedPoint && pointDistance(