节点如何根据内容多少设置宽度 #2422
Unanswered
sunyonghua
asked this question in
Q&A
节点如何根据内容多少设置宽度
#2422
Replies: 3 comments 3 replies
-
想要的结果是可以做到 |
Beta Was this translation helpful? Give feedback.
0 replies
-
使用node.fit() 也没改变节点大小 const initData = () => {
graph.fromJSON(data)
graph.getNodes().forEach((node) => {
node.fit({ deep: true, padding: 50 })
})
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
你的自定义节点不是父级吧? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
默认宽度支撑不了功能
![image](https://user-images.githubusercontent.com/26454332/180912550-c1b209fe-2b6a-4d06-a683-8dfa417853c3.png)
使用方式:
节点内有名称外还有标签,每个标签都代表一个分支节点,存在一个链接桩,且分支内容不定,如何根据分支内容去动态调整节点的宽度
如图:
有没有合适的时机,合适的方法来做这件事?
Beta Was this translation helpful? Give feedback.
All reactions