schema: remove frame bg guard flag from runtime

This commit is contained in:
Ryan Di
2026-03-20 01:06:00 +11:00
parent 5bb3046dea
commit 6d3eb16531
11 changed files with 23 additions and 107 deletions
+1 -4
View File
@@ -10,7 +10,6 @@ import {
getFontString,
getUpdatedTimestamp,
getLineHeight,
isTransparent,
} from "@excalidraw/common";
import type { Radians } from "@excalidraw/math";
@@ -186,13 +185,11 @@ export const newFrameElement = (
name?: string;
} & ElementConstructorOpts,
): NonDeleted<ExcalidrawFrameElement> => {
const frameBase = _newElementBase<ExcalidrawFrameElement>("frame", opts);
const frameElement = newElementWith(
{
...frameBase,
..._newElementBase<ExcalidrawFrameElement>("frame", opts),
type: "frame",
name: opts?.name || null,
backgroundEnabled: !isTransparent(frameBase.backgroundColor),
},
{},
);
+1 -1
View File
@@ -787,7 +787,7 @@ export const renderFrameBackground = (
roundCorners?: boolean;
},
) => {
if (!frame.backgroundEnabled || isTransparent(frame.backgroundColor)) {
if (isTransparent(frame.backgroundColor)) {
return;
}
-1
View File
@@ -163,7 +163,6 @@ export type InitializedExcalidrawImageElement = MarkNonNullable<
export type ExcalidrawFrameElement = _ExcalidrawElementBase & {
type: "frame";
name: string | null;
backgroundEnabled: boolean;
};
export type ExcalidrawMagicFrameElement = _ExcalidrawElementBase & {