Skip to content
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(legend.scroll): scroll animation start position was incorrect #13443

Merged
merged 3 commits into from Oct 17, 2020

Conversation

susiwen8
Copy link
Contributor

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

Fix legend scroll animation always start at first element, even the page number wasn't 1.
The problem was that legend content group always reset position to first element before animation.

Fixed issues

Details

Before: What was the problem?

Kapture 2020-10-17 at 00 01 52

After: How is it fixed in this PR?

Kapture 2020-10-16 at 23 57 00

Usage

Are there any API changes?

  • The API has been changed.

Related test cases or examples to use the new APIs

NA.

Others

Merging options

  • Please squash the commits into a single one when merge.

Other information

@echarts-bot
Copy link

echarts-bot bot commented Oct 16, 2020

Thanks for your contribution!
The community will review it ASAP. In the meanwhile, please checkout the coding standard and Wiki about How to make a pull request.

The pull request is marked to be PR: author is committer because you are a committer of this project.

@susiwen8
Copy link
Contributor Author

Clearly contentPos has some reason to be there, I look into it.

@pissang
Copy link
Contributor

pissang commented Oct 17, 2020

@100pah Can you explain the purpose of contentPos. Obviously, the current animation is not correct.

@pissang pissang requested a review from 100pah October 17, 2020 07:00
@100pah
Copy link
Member

100pah commented Oct 17, 2020

@pissang @susiwen8
This animation is correct in 4.9.
But there is a mistake when refactor it from position to xy in 5.0.

The reason of contentPos:
in case that the elements inside contentGroup are layout not based on [0, 0]. (for example, the left-top displayable part is at [-0.5, -0.5])
In most cases that will not happen.

@100pah 100pah merged commit eadd081 into apache:next Oct 17, 2020
@echarts-bot
Copy link

echarts-bot bot commented Oct 17, 2020

Congratulations! Your PR has been merged. Thanks for your contribution! 👍

@susiwen8 susiwen8 deleted the legend-scroll branch October 18, 2020 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants