antvis / antvis/G6

[V5] When brush-select clearing the state, the original state of the element is not retained

Open
#6,191 4 comments 0 reactions 0 assignees View on GitHub
bug 🐛 v5
Dominant language
TypeScript
Stars
12.3k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

### Describe the bug / 问题描述

![image](https://github.com/user-attachments/assets/0365d18a-7bb6-43f1-b204-103d0b34a98b)

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.