jakezwang opened a new pull request, #21764: URL: https://github.com/apache/echarts/pull/21764
## Brief Information - [x] bug fixing - [ ] new feature - [ ] others ### What does this PR do? Honor `brush.brushMode: 'multiple'` when first activating a toolbox brush tool. ### Fixed issues Fixes #21346. ## Details ### Before: What was the problem? The toolbox only reads `brushModel.brushOption.brushMode`, which is unset before the first brush action. It falls back to `single` even when the brush component is configured for multiple selections; the Keep selection icon also starts in the wrong state. ### After: How does it behave after the fixing? Fall back to the component's configured `brushMode` before the default `single`. Explicit mode changes through Keep selection still take precedence. ## Document Info - [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. ### ZRender Changes - [ ] This PR depends on ZRender changes. ### Related test cases or examples to use the new APIs - Added toolbox unit tests for configured multiple mode, toggling Keep selection, and the default single mode. The first two fail before the fix. - Added a deterministic interaction case at the bottom of `test/brush3.html`. - Verified real Chromium pointer drags retain two selections initially; after turning off Keep selection, a new drag leaves one selection. No page errors. - `TZ=UTC npm test -- --runInBand --coverage=false`: 27 suites / 197 tests passed. - `npm run build:lib`, `npm run checktype`, `npm run lint`, and `node build/build.js --type all`: passed. Generated build output is not included. ### Merging options - [x] Please squash the commits into a single one when merging. ### Other information Implementation and validation were performed primarily with OpenAI Codex. -- 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]
