From fe39bc4a04ac4e3c2ecc726795da61425934f691 Mon Sep 17 00:00:00 2001 From: dwelle <5153846+dwelle@users.noreply.github.com> Date: Fri, 23 Aug 2024 10:42:58 +0200 Subject: [PATCH] fi --- excalidraw-app/components/AI.tsx | 20 ++++++++++++-------- excalidraw-app/components/DebugCanvas.tsx | 2 +- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/excalidraw-app/components/AI.tsx b/excalidraw-app/components/AI.tsx index 621d6befa7a02..3fb8610c536ce 100644 --- a/excalidraw-app/components/AI.tsx +++ b/excalidraw-app/components/AI.tsx @@ -21,15 +21,19 @@ export const AIComponents = ({ const appState = excalidrawAPI.getAppState(); const blob = await exportToBlob({ - elements: children, - appState: { - ...appState, - exportBackground: true, - viewBackgroundColor: appState.viewBackgroundColor, + data: { + elements: children, + appState: { + ...appState, + exportBackground: true, + viewBackgroundColor: appState.viewBackgroundColor, + }, + files: excalidrawAPI.getFiles(), + }, + config: { + exportingFrame: frame, + mimeType: MIME_TYPES.jpg, }, - exportingFrame: frame, - files: excalidrawAPI.getFiles(), - mimeType: MIME_TYPES.jpg, }); const dataURL = await getDataURL(blob); diff --git a/excalidraw-app/components/DebugCanvas.tsx b/excalidraw-app/components/DebugCanvas.tsx index b610ab7b50200..454d14642d17f 100644 --- a/excalidraw-app/components/DebugCanvas.tsx +++ b/excalidraw-app/components/DebugCanvas.tsx @@ -79,7 +79,7 @@ const _debugRenderer = ( scale, normalizedWidth, normalizedHeight, - viewBackgroundColor: "transparent", + canvasBackgroundColor: "transparent", }); // Apply zoom