-
Notifications
You must be signed in to change notification settings - Fork 19.8k
Fix/bug multiple brush and opacity #21369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Fix/bug multiple brush and opacity #21369
Conversation
|
Thanks for your contribution! Please DO NOT commit the files in dist, i18n, and ssr/client/dist folders in a non-release pull request. These folders are for release use only. Document changes are required in this PR. Please also make a PR to apache/echarts-doc for document changes and update the issue id in the PR description. When the doc PR is merged, the maintainers will remove the |
.gitignore
Outdated
| *.asm | ||
|
|
||
| # Distribution files | ||
| /dist |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we release a new version, files in these folders still need to be committed, so please ignore them and just do not commit them instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we release a new version, files in these folders still need to be committed, so please ignore them and just do not commit them instead.
resolved in e8238a2
92de0c8 to
9f86048
Compare
-feat: added the multiple selection without use of prolong mouse down event
9f86048 to
e8238a2
Compare
Ovilia
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's more intuitive to use multiple for default brushMode. And we are very careful to make default value changes because it may cause compatibility problems.
And I don't see the opacity changes as you mentioned in the description.
Brief Information
This pull request is in the type of:
What does this PR do?
Changes the default brush selection mode from 'single' to 'multiple' and increases the opacity of selected areas from 0.1 to 1.0 for better visibility.
Fixed issues
Details
Before: What was the problem?
Issue 1: Brush Selection Mode
Issue 2: Selected Area Opacity
After: How does it behave after the fixing?
Brush Selection Mode:
Selected Area Opacity:
Implementation details:
BrushModel.defaultOption.brushModefrom'single'to'multiple'Brush.ts(toolbox feature) to default to'multiple'mode in therendermethodonclickmethod to always use'multiple'modeDocument Info
One of the following should be checked.
Note: Documentation should be updated to reflect that brush selection now defaults to multiple mode and the changed opacity behavior of selected areas.
Misc
Security Checking
Note: No security-sensitive Web APIs are used in this PR.
ZRender Changes
Related test cases or examples to use the new APIs
Test file created:
test/brush-multiple-test.htmlto demonstrate the new default behavior and improved opacity settings.Merging options
Other information
Files modified:
src/component/brush/BrushModel.ts- Changed defaultbrushModeto'multiple'and increased opacity to 1.0src/component/toolbox/feature/Brush.ts- Updated to always use'multiple'modetest/brush-multiple-test.html- Added test file for verificationBreaking change consideration: This changes default behavior but improves UX. The increased opacity provides much better visual feedback. Users who specifically want single-selection mode or different opacity can still configure it via options.
2025-11-12.11-43-30.mp4