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,