snapshot of https://github.com/excalidraw/excalidraw.git (master, 2026-09-16; blobs > 131072B omitted)
Some checks failed
Tests / test (push) Failing after 15s
Some checks failed
Tests / test (push) Failing after 15s
This commit is contained in:
72
packages/excalidraw/tests/fixtures/elementFixture.ts
vendored
Normal file
72
packages/excalidraw/tests/fixtures/elementFixture.ts
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
import { DEFAULT_FONT_FAMILY } from "@excalidraw/common";
|
||||
|
||||
import type { Radians } from "@excalidraw/math";
|
||||
|
||||
import type { ExcalidrawElement } from "@excalidraw/element/types";
|
||||
|
||||
const elementBase: Omit<ExcalidrawElement, "type"> = {
|
||||
id: "vWrqOAfkind2qcm7LDAGZ",
|
||||
x: 414,
|
||||
y: 237,
|
||||
width: 214,
|
||||
height: 214,
|
||||
angle: 0 as Radians,
|
||||
strokeColor: "#000000",
|
||||
backgroundColor: "#15aabf",
|
||||
fillStyle: "hachure",
|
||||
strokeWidth: 1,
|
||||
strokeStyle: "solid",
|
||||
roughness: 1,
|
||||
opacity: 100,
|
||||
groupIds: [],
|
||||
frameId: null,
|
||||
roundness: null,
|
||||
index: null,
|
||||
seed: 1041657908,
|
||||
version: 120,
|
||||
versionNonce: 1188004276,
|
||||
isDeleted: false,
|
||||
boundElements: null,
|
||||
updated: 1,
|
||||
created: null,
|
||||
link: null,
|
||||
locked: false,
|
||||
};
|
||||
|
||||
export const rectangleFixture: ExcalidrawElement = {
|
||||
...elementBase,
|
||||
type: "rectangle",
|
||||
};
|
||||
export const embeddableFixture: ExcalidrawElement = {
|
||||
...elementBase,
|
||||
type: "embeddable",
|
||||
};
|
||||
export const ellipseFixture: ExcalidrawElement = {
|
||||
...elementBase,
|
||||
type: "ellipse",
|
||||
};
|
||||
export const diamondFixture: ExcalidrawElement = {
|
||||
...elementBase,
|
||||
type: "diamond",
|
||||
};
|
||||
export const rectangleWithLinkFixture: ExcalidrawElement = {
|
||||
...elementBase,
|
||||
type: "rectangle",
|
||||
link: "excalidraw.com",
|
||||
};
|
||||
|
||||
export const textFixture: ExcalidrawElement = {
|
||||
...elementBase,
|
||||
type: "text",
|
||||
fontSize: 20,
|
||||
baseFontSize: null,
|
||||
fontFamily: DEFAULT_FONT_FAMILY,
|
||||
strokeColor: "#1e1e1e",
|
||||
text: "original text",
|
||||
originalText: "original text",
|
||||
textAlign: "left",
|
||||
verticalAlign: "top",
|
||||
containerId: null,
|
||||
lineHeight: 1.25 as any,
|
||||
autoResize: false,
|
||||
};
|
||||
Reference in New Issue
Block a user