From 7859531efe3c99ad5fe1b93ba29f0d95107c5070 Mon Sep 17 00:00:00 2001 From: dwelle <5153846+dwelle@users.noreply.github.com> Date: Sat, 21 Mar 2026 20:56:56 +0100 Subject: [PATCH] fix ts --- excalidraw-app/components/DebugCanvas.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/excalidraw-app/components/DebugCanvas.tsx b/excalidraw-app/components/DebugCanvas.tsx index f5ae90ff7a..5fa290e075 100644 --- a/excalidraw-app/components/DebugCanvas.tsx +++ b/excalidraw-app/components/DebugCanvas.tsx @@ -37,6 +37,7 @@ import { type GlobalPoint, type LocalPoint, type LineSegment, + type Radians, } from "@excalidraw/math"; import { isCurve } from "@excalidraw/math/curve"; @@ -52,6 +53,7 @@ import type { ExcalidrawArrowElement, ExcalidrawBindableElement, FixedPointBinding, + Ordered, OrderedExcalidrawElement, } from "@excalidraw/element/types"; import type { SimpleArrowCurveDebugData } from "@excalidraw/element"; @@ -133,7 +135,7 @@ const getSimpleArrowTransform = ( const rotated = pointRotateRads( pointFrom(vector[0], vector[1]), pointFrom(0, 0), - -element.angle, + -element.angle as Radians, ); return [rotated[0], rotated[1]]; @@ -146,7 +148,7 @@ const getSimpleArrowDebugStateForElement = ( elementId: string, ): SelectedSimpleArrowDebugState | null => { const element = elements.find( - (candidate): candidate is ExcalidrawArrowElement => + (candidate): candidate is Ordered => candidate.id === elementId && !candidate.isDeleted && isArrowElement(candidate) && @@ -1059,7 +1061,7 @@ const DebugCanvas = React.forwardRef( const nextElements = excalidrawAPI.getSceneElements() as OrderedExcalidrawElement[]; const element = nextElements.find( - (candidate): candidate is ExcalidrawArrowElement => + (candidate): candidate is Ordered => candidate.id === handle.elementId && !candidate.isDeleted && isArrowElement(candidate),