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 hover interaction animations #119

Merged
merged 1 commit into from
Mar 14, 2019

Conversation

simonbrunel
Copy link
Member

Flag the render request as "lazy" so the controller can cancel it in order to correctly animate hover interactions. The 1ms duration is a workaround to make sure an animation is created so the controller can stop it before any transition. Also, verify if there is an "active" animation, in which case we don't need to explicitly call render().

@dutrieux @rpearce can you verify if these changes fix your issues?

@nagix what do you think about that workaround?

Fixes #108

Flag the render request as "lazy" so the controller can cancel it in order to correctly animate hover interactions. The 1ms duration is a workaround to make sure an animation is created so the controller can stop it before any transition. Also, verify if there is an active animation, in which case we don't need to explicitly call render().
@simonbrunel simonbrunel added this to the Version 0.6 milestone Mar 12, 2019
@rpearce
Copy link

rpearce commented Mar 12, 2019

@simonbrunel what do you think is the best way do testing here?

  1. clone your fork and npm link?
  2. copy and paste this code into the source?

@simonbrunel
Copy link
Member Author

@rpearce
Copy link

rpearce commented Mar 12, 2019

@simonbrunel okay cool. I'll test this today!

@rpearce
Copy link

rpearce commented Mar 13, 2019

Update: can't get to it today. ASAP!

Copy link

@nagix nagix left a comment

Choose a reason for hiding this comment

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

The workaround looks good to me. chartjs-plugin-streaming has the same code to check the active hover/tooltip animation.

@simonbrunel simonbrunel merged commit aab0a1f into chartjs:master Mar 14, 2019
@simonbrunel simonbrunel deleted the fix/animation branch March 14, 2019 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

hover.animationDuration:0 doesn't disable animation tooltip with datalabels plugins
3 participants