rahul37wallst-sudo opened a new pull request, #21681: URL: https://github.com/apache/echarts/pull/21681
<!-- Please fill in the following information to help us review your PR more efficiently. --> ## Brief Information This pull request is in the type of: - [x] bug fixing - [ ] new feature - [ ] others ### What does this PR do? Applies configured `select.lineStyle` to tree node edges when tree nodes are selected. ### Fixed issues - #18214: Tree series `select.lineStyle` did not affect the selected node's branch/edge. ## Details ### Before: What was the problem? Tree node symbols could enter the `select` state correctly, so `select.itemStyle` worked on the selected node. However, the tree edge/branch is rendered as a sibling element of the node symbol group, not as a child of it. The generic selection update only marks the node symbol group as selected, so the edge never entered the `select` state even though its `select.lineStyle` state style was already configured. ### After: How does it behave after the fixing? Tree edges now mirror the selection state of their corresponding tree nodes. The fix updates tree edge selection in `TreeView` by applying `enterSelect` / `leaveSelect` to each node edge based on `seriesModel.isSelected(dataIndex)`. It runs after render and during `select`, `unselect`, and `toggleSelect` actions, so both initial selected state and later selection changes are handled. A regression unit test was added to verify that: - `select.lineStyle.color` is stored on the tree edge select state; - selecting a tree node marks its edge as selected; - single-select selection clears the previously selected edge and selects the new edge. ## 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 ### Security Checking - [ ] This PR uses security-sensitive Web APIs. <!-- PLEASE CHECK IT AGAINST: <https://github.com/apache/echarts/wiki/Security-Checklist-for-Code-Contributors> --> ### ZRender Changes - [ ] This PR depends on ZRender changes (ecomfe/zrender#xxx). ### Related test cases or examples to use the new APIs `test/ut/spec/series/tree.test.ts` Validation run: ```sh npx jest --config test/ut/jest.config.cjs --coverage=false --runInBand --runTestsByPath test/ut/spec/series/tree.test.ts npm run checktype npm run lint npx eslint test/ut/spec/series/tree.test.ts git --no-pager diff --check ``` ### Merging options - [x] Please squash the commits into a single one when merging. ### Other information N.A. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
