support labelled arrows

This commit is contained in:
Aakansha Doshi
2023-05-16 17:49:24 +05:30
parent fbf2d533c0
commit a443d65512
2 changed files with 34 additions and 15 deletions

View File

@@ -667,13 +667,8 @@ export const convertToExcalidrawElements = (
if (!element) {
return;
}
if (
isValidTextContainer(element) &&
element?.label?.text &&
(element.type === "rectangle" ||
element.type === "ellipse" ||
element.type === "diamond")
) {
if (isValidTextContainer(element) && element?.label?.text) {
//@ts-ignore
const elements = bindTextToContainer(element, element.label);
res.push(...elements);
} else {