SahinurDEV opened a new pull request, #21792:
URL: https://github.com/apache/echarts/pull/21792

   ## Brief Information
   
   This pull request is in the type of:
   
   - [x] bug fixing
   - [ ] new feature
   - [ ] others
   
   ### What does this PR do?
   
   Makes radar symbols animate out from the center together with the 
polyline/polygon on enter again, as they did in 4.x.
   
   ### Fixed issues
   
   - #21774: Radar series: symbols skip the entry animation and appear at their 
final positions
   
   ## Details
   
   ### Before: What was the problem?
   
   In the `add` branch of `RadarView`, the symbols' start positions were read 
from `polyline.shape.points` right after `graphic.initProps(polyline, ...)`. 
With zrender 5, `animateTo` already writes the target points into 
`polyline.shape.points` (in place) before the first frame. So `updateSymbols` 
received the final points as both "old" and "new". The symbols were placed at 
their final positions and `initProps` had nothing to animate: no animator was 
created, and they appeared immediately while the lines grew from the center.
   
   ### After: How does it behave after the fixing?
   
   The `add` branch passes fresh `getInitialPoints(points)` (the radar center) 
to `updateSymbols`, so each symbol starts at the center and gets an enter 
animation to its final point, in sync with the lines. I used a separate array 
on purpose: zrender mutates the polyline's points array in place, so reusing 
that array would bring the bug back. The `update` branch is unchanged.
   
   Added `test/ut/spec/series/radar.test.ts`:
   - with a long `animationDuration`, every symbol starts at the radar center 
and has an animator whose first keyframe is the center and last keyframe is its 
layout point (fails on master: the symbol is already at its final `y`, with no 
animator)
   - with `animation: false`, symbols are placed at their final positions with 
no animators
   
   `npm test` (27 suites / 196 tests), eslint on the changed file and `tsc 
--noEmit` pass locally.
   
   ## Document Info
   
   - [x] This PR doesn't relate to document changes
   
   ## Misc
   
   ### Security Checking
   
   - [ ] This PR uses security-sensitive Web APIs.
   
   ### ZRender Changes
   
   - [ ] This PR depends on ZRender changes (ecomfe/zrender#xxx).
   
   ### Related test cases or examples to use the new APIs
   
   N.A.
   
   ### Merging options
   
   - [ ] Please squash the commits into a single one when merging.
   
   ### Other information
   
   AI disclosure: I used an AI coding assistant to help investigate and write 
this fix and its tests. I reviewed the change and ran the tests myself.
   


-- 
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