MindFreeze opened a new pull request, #21810: URL: https://github.com/apache/echarts/pull/21810
<!-- Please fill in the following information to help us review your PR more efficiently. --> ## Brief Information This pull request is in the type of: - [x] bug fixing - [ ] new feature - [ ] others ### What does this PR do? <!-- USE ONE SENTENCE TO DESCRIBE WHAT THIS PR DOES. --> Finish a running label fade-in before an instant label update, so zooming during the fade no longer leaves labels half transparent. ### Fixed issues <!-- - #xxxx: ... --> N.A. ## Details ### Before: What was the problem? <!-- DESCRIBE THE BUG OR REQUIREMENT HERE. --> <!-- ADD SCREENSHOT HERE IF APPLICABLE. --> When labels are laid out for the first time with animation enabled, `LabelManager` fades them in from opacity 0. A zoom roam calls `api.updateLabelLayout()`, and roam payloads disable animation, so `updateProps` on the label takes the instant branch of `animateOrSetProps`. That branch calls `el.stopAnimation()`, which also stops the fade-in. The label keeps the opacity it had reached, and later layouts never touch its opacity again. Graph with `layout: 'none'`, zoomed 1 second into a 5 second fade-in. The labels stay at opacity 0.2:  ### After: How does it behave after the fixing? <!-- THE RESULT AFTER FIXING AND A SIMPLE EXPLANATION ABOUT HOW IT IS FIXED. --> <!-- ADD SCREENSHOT HERE IF APPLICABLE. --> Before an instant update, `_animateLabels` finishes the label's own `enter` animations with `stopAnimation('enter', true)`. The label jumps to its final opacity. Animated updates are unchanged.  ## Document Info One of the following should be checked. - [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 ### ZRender Changes - [ ] This PR depends on ZRender changes (ecomfe/zrender#xxx). ### Related test cases or examples to use the new APIs `test/label-animation.html`, last case. ## Others ### Merging options - [ ] Please squash the commits into a single one when merging. ### Other information Found in the Home Assistant network graph, which carries this fix as a patch: home-assistant/frontend#55397. -- 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]
