-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
使用 node.setAttrs({label:{text:''}}) 不起作用 #3955
Comments
|
我本地试了一下是好的呀,你的测试 demo 发一下? |
|
|
This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread. |
Describe the bug
x6版本2.15.1初始化渲染数据,当节点值为 {label:{text:''}} 时显示 -
使用 node.setAttrs({label:{text:''}}) 不起作用
Your Example Website or App
https://codesandbox.io/s/html-css-js-t245jd?file=/src/index.js
//
Steps to Reproduce the Bug or Issue
1、节点部分数据 {label:{text:''}} ,使用graph.fromJson渲染节点
2、使用 node.setAttrs({label:{text:''}}) 修改label的值
Expected behavior
作为用户,我希望fromJson渲染节点正常显示label值为空字符串的情况、node.setAttrs({label:{text:''}}) 生效把label的值置为空;但我看到的是fromJson渲染节点空字符串时为'-',node.setAttrs({label:{text:''}}) 时不生效
Screenshots or Videos
No response
Platform
Additional context
注: 不一定是label元素,其它具有text属性的元素也存在上述问题
The text was updated successfully, but these errors were encountered: