Update index.ts

demo中 https://g6.antv.vision/zh/examples/case/decisionTree

第一次点击根节点的使得节点全部collapsed的时候, TextShape的text还是‘-’, 但理论上说应该为‘+’。
This commit is contained in:
zchuhyy 2020-08-20 17:00:57 +08:00 committed by Yanyan Wang
parent 6b1d62c5a9
commit 5743df8494

View File

@ -495,7 +495,7 @@ const initEvent = () => {
updateCollapseStatus(id, recordIndex, collapsed);
graph.changeData(getPosition(backUpData));
await sleep(500);
graph.setItemState(item, 'click', false);
graph.setItemState(item, 'click', true);
isAnimating = false;
} else {
updateCollapseStatus(id, recordIndex, collapsed, 'collapsed');
@ -514,7 +514,7 @@ const initEvent = () => {
graph.remove(childrenItem);
}
});
graph.setItemState(item, 'click', false);
graph.setItemState(item, 'click', true);
isAnimating = false;
}
} else {