cell.prop('label')获取不到label值,也期望可以设置,同时label也更新
问题描述
创建一个节点,然后通过prop去获取它的label,获取不到; 设置后,发现无法节点label无法同步
重现链接
https://codesandbox.io/p/sandbox/compassionate-goldwasser-7dqvd8
重现步骤
- 创建一个节点
- 然后通过prop获取label
- 发现获取不到,设置也不成功
预期行为
cell.prop('label')获取成功,也可以设置成功
平台
- 操作系统: [macOS, Windows, Linux, React Native ...]
- 网页浏览器: [Google Chrome, Safari, Firefox ...]
- X6 版本: [2.11.1 ...]
屏幕截图或视频(可选)
No response
补充说明(可选)
No response
👋 @gdutwyg
Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. To help make it easier for us to investigate your issue, please follow the contributing guidelines. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
获取:node.attr("text/text") 设置:node.attr("text/text","值")
获取:node.attr("text/text") 设置:node.attr("text/text","值")
我知道attr,但是这个设置attr的text并不能同步修改label,我期望既可以修改label,又可以把修改后的同步到attr里面
这个设置attr的text并不能同步修改label
实测是可以同步的
.attr("text/text","值")
好的,谢谢,这个有效果,之前我看的官方文档,发现没效果才用的prop,你可以试试 https://x6.antv.antgroup.com/api/model/cell