From a1529657ba064a88e046769bcb573a1154ae3e33 Mon Sep 17 00:00:00 2001 From: qiufeihong Date: Thu, 7 Sep 2023 17:01:23 +0800 Subject: [PATCH] fix: edge does not display the label after setting the label and textWrap (#3892) --- packages/x6/src/registry/attr/text.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/x6/src/registry/attr/text.ts b/packages/x6/src/registry/attr/text.ts index db6b7752c0f..ffc2733099d 100644 --- a/packages/x6/src/registry/attr/text.ts +++ b/packages/x6/src/registry/attr/text.ts @@ -96,7 +96,8 @@ export const textWrap: Attr.Definition = { let wrappedText let txt = info.text if (txt == null) { - txt = attrs.text + // the edge of the label is assigned to txt + txt = attrs.text || elem?.textContent } if (txt != null) {