[V5] When brush-select clearing the state, the original state of the element is not retained
- Dominant language
- TypeScript
- Stars
- 12.3k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the bug / 问题描述

I think it is only necessary to clear the state set by "brush-select".
https://github.com/antvis/G6/blob/ab97b6a84c9b1ac7f599e34568714376278583f0/packages/g6/src/behaviors/brush-select.ts#L212
### Reproduction link / 重现链接
_No response_
### Steps to Reproduce the Bug or Issue / 重现步骤
1. Enable `brush-select`
2. Click canvas
3. All element states will be clear
### G6 Version / G6 版本
🆕 5.x
### Operating System / 操作系统
macOS, Windows
### Browser / 浏览器
Chrome, Edge, Others / 其他
### Additional context / 补充说明
_No response_
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in packages/g6/src/behaviors/brush-select.ts around line 212 and reproduce the issue with brush-select enabled, then click the canvas. Trace which states are cleared and compare them with the element states present before the click. Done means clearing brush-select state without removing the element's original state.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- data-visualization, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100