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

Optimize: disable tooltip transition at first show #13067

Merged
merged 6 commits into from
Aug 5, 2020

Conversation

susiwen8
Copy link
Contributor

@susiwen8 susiwen8 commented Aug 1, 2020

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

The first time of showing tooltip on each chart, because of transition, tooltip rise from the bottom. So disable transition on the first time

Fixed issues

Details

Before: What was the problem?

After: How is it fixed in this PR?

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 Aug 1, 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.

@@ -153,7 +151,7 @@ function assembleCssText(tooltipModel: Model<TooltipOption>) {
cssText.push('box-shadow:' + boxShadow);
// Animation transition. Do not animate when transitionDuration is 0.
// If tooltip show arrow, then disable transition
transitionDuration
!isFirstShow && transitionDuration
&& !(['top', 'left', 'bottom', 'right'].includes(tooltipModel.get('position') as string))
&& tooltipModel.get('trigger') !== 'item'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't notice it before. But we should use zrUtil.indexOf instead of includes here.

Also in the assembleArrow function also has includes usage. Which should be changed.

@pissang
Copy link
Contributor

pissang commented Aug 5, 2020

Hi @susiwen8. Just a suggestion that we should use more clear commits message. For example https://www.conventionalcommits.org/en/v1.0.0-beta.4/#summary

It's not a good style to use a very general and unclear message like "Coorection base CR"

@susiwen8
Copy link
Contributor Author

susiwen8 commented Aug 5, 2020

Hi @susiwen8. Just a suggestion that we should use more clear commits message. For example https://www.conventionalcommits.org/en/v1.0.0-beta.4/#summary

It's not a good style to use a very general and unclear message like "Coorection base CR"

Roger that 😛

@pissang pissang merged commit 6ffe4ee into apache:next Aug 5, 2020
@echarts-bot
Copy link

echarts-bot bot commented Aug 5, 2020

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

@susiwen8 susiwen8 deleted the toolitip branch August 5, 2020 07:50
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