From 62a5b779b3a765b4d0e284d24a32e9dfd5970a9c 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 00376c48f4b43..6843704045606 100644 --- a/excalidraw-app/components/DebugCanvas.tsx +++ b/excalidraw-app/components/DebugCanvas.tsx @@ -71,7 +71,7 @@ const _debugRenderer = ( scale, normalizedWidth, normalizedHeight, - viewBackgroundColor: "transparent", + canvasBackgroundColor: "transparent", }); // Apply zoom