feat: Support exporting with dark mode (#3046)
Co-authored-by: Lipis <lipiridis@gmail.com> Co-authored-by: dwelle <luzar.david@gmail.com>
This commit is contained in:
@ -49,6 +49,7 @@ import {
|
||||
} from "../element/transformHandles";
|
||||
import { viewportCoordsToSceneCoords, supportsEmoji } from "../utils";
|
||||
import { UserIdleState } from "../excalidraw-app/collab/types";
|
||||
import { APPEARANCE_FILTER } from "../constants";
|
||||
|
||||
const hasEmojiSupport = supportsEmoji();
|
||||
|
||||
@ -211,6 +212,10 @@ export const renderScene = (
|
||||
const normalizedCanvasWidth = canvas.width / scale;
|
||||
const normalizedCanvasHeight = canvas.height / scale;
|
||||
|
||||
if (sceneState.exportWithDarkMode) {
|
||||
context.filter = APPEARANCE_FILTER;
|
||||
}
|
||||
|
||||
// Paint background
|
||||
if (typeof sceneState.viewBackgroundColor === "string") {
|
||||
const hasTransparence =
|
||||
|
Reference in New Issue
Block a user