Skip to content

Commit 09a2c14

Browse files
qiufeihong2018qiufeihong
andauthored
fix: edge does not display the label after setting the label and text… (antvis#3896)
fix: edge does not display the label after setting the label and textWrap (antvis#3892) Co-authored-by: qiufeihong <[email protected]>
1 parent 78e5274 commit 09a2c14

File tree

1 file changed

+2
-1
lines changed
  • packages/x6/src/registry/attr

1 file changed

+2
-1
lines changed

packages/x6/src/registry/attr/text.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ export const textWrap: Attr.Definition = {
9696
let wrappedText
9797
let txt = info.text
9898
if (txt == null) {
99-
txt = attrs.text
99+
// the edge of the label is assigned to txt
100+
txt = attrs.text || elem?.textContent
100101
}
101102

102103
if (txt != null) {

0 commit comments

Comments
 (0)