rename name to customType

This commit is contained in:
ad1992
2022-03-24 14:04:31 +05:30
parent 3d0a1106ff
commit 8706277d14
11 changed files with 22 additions and 22 deletions
+2 -2
View File
@@ -320,14 +320,14 @@ export const newImageElement = (
};
export const newCustomElement = (
name: string,
customType: string,
opts: {
type: ExcalidrawCustomElement["type"];
} & ElementConstructorOpts,
): NonDeleted<ExcalidrawCustomElement> => {
return {
..._newElementBase<ExcalidrawCustomElement>("custom", opts),
name,
customType,
};
};
// Simplified deep clone for the purpose of cloning ExcalidrawElement only
+1 -1
View File
@@ -84,7 +84,7 @@ export type ExcalidrawImageElement = _ExcalidrawElementBase &
}>;
export type ExcalidrawCustomElement = _ExcalidrawElementBase &
Readonly<{ type: "custom"; name: string }>;
Readonly<{ type: "custom"; customType: string }>;
export type InitializedExcalidrawImageElement = MarkNonNullable<
ExcalidrawImageElement,