echarts
echarts copied to clipboard
fix(tree): fix tree update error with animation and without animation
Brief Information
This pull request is in the type of:
- [x] bug fixing
- [ ] new feature
- [ ] others
What does this PR do?
- For
polyline
, with animation on, to filter out nodes that are about to exit, and clearsourceEdge
if the number of remaining nodes is 0 - For all
tree
, with animation off, pass the current node inremoveNodeEdge
since the current node is immediately deleted, making it impossible to get the current node by dataIndex.
Fixed issues
- #18448
- #18490
Details
Before: What was the problem?
- For
polyline
, when a child node is removed by updating the node, the line is not removed - For all
trees
, when collapsing a node with animation off, lines will be left behind
After: How does it behave after the fixing?
- for
polyline
, when a child node is removed by updating the node, the lines will be removed - For all
trees
, collapse the node with the animation off, no lines will be left
Document Info
One of the following should be checked.
- [x] This PR doesn't relate to document changes
- [ ] The document should be updated later
- [ ] The document changes have been made in apache/echarts-doc#xxx
Misc
ZRender Changes
- [ ] This PR depends on ZRender changes (ecomfe/zrender#xxx).
Related test cases or examples to use the new APIs
N.A.
Others
Merging options
- [ ] Please squash the commits into a single one when merging.
Other information
Thanks for your contribution! The community will review it ASAP. In the meanwhile, please checkout the coding standard and Wiki about How to make a pull request.
@Ovilia When will this PR be reviewed? It's been almost a year now and the bug persists.