fix(treemap): fix treemap can not be zoomed out after a zoom-in when scaleLimit is specified#21427
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. |
scaleLimit is specified
…scaleLimit is specified apache#21427
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug where the treemap cannot be zoomed out after zooming in when scaleLimit is specified. The issue occurred because _resetController was being called on every render and unconditionally resetting the controllerHost.zoom value back to the initial value from the series model, which prevented users from zooming out after zooming in.
Key Changes:
- Added a null check before setting
controllerHost.zoomto preserve zoom state across renders
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
The changes brought by this PR can be previewed at: https://echarts.apache.org/examples/editor?version=PR-21427@ea05ee5 |
…Limit" cover "treemapZoomToNode" case, otherwise the behavior is unexpected. (3) Make "scaleLimit" cover the case that users specify `rootRect` directly in `dispatchAction`, though this usage is never officially exposed. (4) Remove ec2 compat code, which has stopped working.
|
Congratulations! Your PR has been merged. Thanks for your contribution! 👍 |
Brief Information
This pull request is in the type of:
What does this PR do?
Fix treeMap scaleLimit bug
Fixed issues
Details
Before: What was the problem?
After: How does it behave after the fixing?
Document Info
One of the following should be checked.
Misc
Security Checking
ZRender Changes
Related test cases or examples to use the new APIs
N.A.
Merging options
Other information