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: [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]

Reply via email to