Skip to content

Commit

Permalink
docs: tree changeData demo problem (#4373)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yanyan-Wang authored Mar 22, 2023
1 parent dcb27b0 commit 34eae7d
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ graph.node(function (node) {
labelCfg: {
position: node.children && node.children.length > 0 ? 'left' : 'right',
},
// 避免点击节点时,同时增加子树和收起节点,看起来行为奇怪
collapsed: node.children?.length ? false : true
};
});
let i = 0;
Expand All @@ -67,9 +69,6 @@ graph.edge(function () {
const data = {
isRoot: true,
id: 'Root',
style: {
fill: 'red',
},
children: [
{
id: 'SubTreeNode1',
Expand Down

0 comments on commit 34eae7d

Please sign in to comment.