-
Notifications
You must be signed in to change notification settings - Fork 19.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(bar-race): fix lines glitch with sub-pixel optimization in animations #14679 #17426
Conversation
Thanks for your contribution! The pull request is marked to be Document changes are required in this PR. Please also make a PR to apache/echarts-doc for document changes and update the issue id in the PR description. When the doc PR is merged, the maintainers will remove the |
I think we can turn it off |
@pissang Do you mean to turn it off when |
I meant disable it |
@pissang I'm not quite sure about if it's proper to make a done callback for group animations. Please help review again. |
A more general solution is using a
This is not necessary. |
In general I will give +1 on this PR. |
2022-08-04.15.46.59.movI found a small shaking of the axisLine when legend is toggled. Is this acceptable? |
@Ovilia I think it will be better to fix it. Seems it's because the animation will still perform even if the axis lines are exactly the same. We can do a further check if the points of lines are changed and still set subPixelOptimize to true if they are not changed. |
@pissang I added the logic so that Other way to fix this is before calling graphic.groupTransition, I first traverse the group to check if anything changes and call |
Sorry for the late reply.
What I thought was this way. Because the logic to toggle the subPixelOptimize flag is outside of the |
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?
Apache ECharts uses sub-pixel optimization on horizontal and vertical axes (including splitLines, ticks, and minorTicks) so that these lines should be drawn only at the positions like
10px
,10.5px
,11px
for lines whose lineWidth is 1.But for the case of bar-racing, this may cause the weried moving of split lines as reported in #14679 . So this PR disables sub-pixel optimization when in animation to solve the problem.
Fixed issues
#14679
Details
Before: What was the problem?
2022-07-26.14.59.10.mov
Pay attention to the red lines.
After: How does it behave after the fixing?
2022-07-26.15.00.34.mov
Document Info
One of the following should be checked.
Misc
ZRender Changes
Related test cases or examples to use the new APIs
N.A.
Others
Merging options
Other information