From 012076a3e9ee9489342b3a7c0590cead41fae0f9 Mon Sep 17 00:00:00 2001 From: dwelle <5153846+dwelle@users.noreply.github.com> Date: Wed, 7 May 2025 23:04:22 +0200 Subject: [PATCH] TBD: remove bg color when disabling polygon --- packages/excalidraw/actions/actionLinearEditor.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/excalidraw/actions/actionLinearEditor.tsx b/packages/excalidraw/actions/actionLinearEditor.tsx index df0038d46..ed2d9164e 100644 --- a/packages/excalidraw/actions/actionLinearEditor.tsx +++ b/packages/excalidraw/actions/actionLinearEditor.tsx @@ -147,10 +147,12 @@ export const actionToggleLoopLock = register({ return element; } - return newElementWith( - element, - toggleLinePolygonState(element, newLoopLockState), - ); + return newElementWith(element, { + backgroundColor: newLoopLockState + ? element.backgroundColor + : "transparent", + ...toggleLinePolygonState(element, newLoopLockState), + }); }), appState, captureUpdate: CaptureUpdateAction.IMMEDIATELY,