mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix: cleanup after rebase
This commit is contained in:
parent
c2870a6df5
commit
5ff4e0d640
3 changed files with 14 additions and 29 deletions
|
@ -402,6 +402,7 @@ const bootstrapCanvas = ({
|
|||
theme,
|
||||
isExporting,
|
||||
viewBackgroundColor,
|
||||
exportWithFancyBackground,
|
||||
}: {
|
||||
canvas: HTMLCanvasElement;
|
||||
scale: number;
|
||||
|
@ -410,6 +411,7 @@ const bootstrapCanvas = ({
|
|||
theme?: AppState["theme"];
|
||||
isExporting?: StaticCanvasRenderConfig["isExporting"];
|
||||
viewBackgroundColor?: StaticCanvasAppState["viewBackgroundColor"];
|
||||
exportWithFancyBackground?: boolean;
|
||||
}): CanvasRenderingContext2D => {
|
||||
const context = canvas.getContext("2d")!;
|
||||
|
||||
|
@ -419,7 +421,6 @@ const bootstrapCanvas = ({
|
|||
if (isExporting && theme === "dark") {
|
||||
context.filter = THEME_FILTER;
|
||||
}
|
||||
|
||||
// Paint background
|
||||
if (typeof viewBackgroundColor === "string") {
|
||||
const hasTransparence =
|
||||
|
@ -434,7 +435,7 @@ const bootstrapCanvas = ({
|
|||
context.fillStyle = viewBackgroundColor;
|
||||
context.fillRect(0, 0, normalizedWidth, normalizedHeight);
|
||||
context.restore();
|
||||
} else {
|
||||
} else if (!exportWithFancyBackground) {
|
||||
context.clearRect(0, 0, normalizedWidth, normalizedHeight);
|
||||
}
|
||||
|
||||
|
@ -924,6 +925,7 @@ const _renderStaticScene = ({
|
|||
theme: appState.theme,
|
||||
isExporting,
|
||||
viewBackgroundColor: appState.viewBackgroundColor,
|
||||
exportWithFancyBackground: renderConfig.exportWithFancyBackground,
|
||||
});
|
||||
|
||||
// Apply zoom
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue