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) {