feat: Support custom elements in @excalidraw/excalidraw

This commit is contained in:
ad1992
2022-03-23 19:04:00 +05:30
parent 2209e2c1e8
commit 39d0084a5e
13 changed files with 202 additions and 13 deletions
+3
View File
@@ -44,6 +44,7 @@ export const AllowedExcalidrawElementTypes: Record<
arrow: true,
freedraw: true,
eraser: false,
custom: true,
};
export type RestoredDataState = {
@@ -193,6 +194,8 @@ const restoreElement = (
y,
});
}
case "custom":
return restoreElementWithProperties(element, { name: "custom" });
// generic elements
case "ellipse":
return restoreElementWithProperties(element, {});