You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "waterWang (via GitHub)" <gi...@apache.org> on 2026/08/09 12:33:48 UTC
[PR] fix(toolbox): reset dataZoom active state on restore [echarts]
waterWang opened a new pull request, #21720:
URL: https://github.com/apache/echarts/pull/21720
## Brief Information
This pull request is in the type of:
- [x] bug fixing
### What does this PR do?
Resets the toolbox dataZoom feature's active state when the "restore" action is dispatched, so the zoom toggle behaves correctly after a chart restore.
### Fixed issues
- #21661: [Bug] Update from 5 to 6 causes trigger multiple toolbox datazoom
## Details
### Before: What was the problem?
After clicking "Enable drag zoom" (which dispatches `takeGlobalCursor` with `dataZoomSelectActive: true`), zooming, then clicking the toolbox "Restore" button, the `_isZoomActive` flag stayed `true`. Clicking "Enable drag zoom" again would toggle it off (because the `zoom` handler computes `!this._isZoomActive`), leaving the feature in a broken state where the second zoom produces a wrong result.
### After: How does it behave after the fixing?
Added a check for the "restore" payload type in `updateZoomBtnStatus`, resetting `zoomActive` to `false`. Now after restore the brush controller is properly disabled, and the next "Enable drag zoom" click correctly re-enables it, producing a correct zoom.
close #21661
--
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: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
Re: [PR] fix(toolbox): reset dataZoom active state on restore [echarts]
Posted by "echarts-bot[bot] (via GitHub)" <gi...@apache.org>.
echarts-bot[bot] commented on PR #21720:
URL: https://github.com/apache/echarts/pull/21720#issuecomment-5231543978
Thanks for your contribution!
The community will review it ASAP. In the meanwhile, please checkout [the coding standard](https://echarts.apache.org/en/coding-standard.html) and Wiki about [How to make a pull request](https://github.com/apache/echarts/wiki/How-to-make-a-pull-request).
Please **DO NOT** commit the files in [dist](https://github.com/apache/echarts/tree/master/dist), [i18n](https://github.com/apache/echarts/tree/master/i18n), and [ssr/client/dist](https://github.com/apache/echarts/tree/master/ssr/client/dist) folders in a non-release pull request. These folders are for release use only.
To reviewers: If this PR is going to be described in the changelog in the future release, please make sure this PR has one of the following labels: `PR: doc ready`, `PR: awaiting doc`, `PR: doc unchanged`
This message is shown because the PR description doesn't contain the document related template.
--
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: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org