restore custom elements with correct type

This commit is contained in:
ad1992 2022-03-30 14:20:29 +05:30
parent d27b32dd2c
commit ed3eda3401
2 changed files with 29 additions and 1 deletions

View File

@ -195,7 +195,9 @@ const restoreElement = (
});
}
case "custom":
return restoreElementWithProperties(element, { customType: "custom" });
return restoreElementWithProperties(element, {
customType: element.customType || "custom",
});
// generic elements
case "ellipse":
return restoreElementWithProperties(element, {});

View File

@ -69,6 +69,32 @@ export default {
status: "pending",
scale: [1, 1],
},
{
id: "z35XgE9DvTXlG1OzXmp2x",
type: "custom",
x: 147.13928993437958,
y: 328.8974609375,
width: 60,
height: 60,
angle: 0,
strokeColor: "#000000",
backgroundColor: "transparent",
fillStyle: "hachure",
strokeWidth: 1,
strokeStyle: "solid",
roughness: 1,
opacity: 100,
groupIds: [],
strokeSharpness: "round",
seed: 1483808630,
version: 79,
versionNonce: 861014250,
isDeleted: false,
boundElements: null,
updated: 1648630123004,
link: null,
customType: "star",
},
],
appState: { viewBackgroundColor: "#AFEEEE", currentItemFontFamily: 1 },
scrollToContent: true,