Skip to content

Commit

Permalink
Merge pull request #2056 from parasharrajat/parasharrajat/tooltip
Browse files Browse the repository at this point in the history
Tooltip modifications
  • Loading branch information
marcaaron authored Mar 25, 2021
2 parents 6f76e84 + 25c10d1 commit 2dc397d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/Tooltip/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ class Tooltip extends PureComponent {
* Display the tooltip in an animation.
*/
showTooltip() {
this.animation.stopAnimation();
this.shouldStartShowAnimation = true;

// We have to dynamically calculate the position here as tooltip could have been rendered on some elments
Expand All @@ -148,6 +149,7 @@ class Tooltip extends PureComponent {
Animated.timing(this.animation, {
toValue: 1,
duration: 140,
delay: 500,
}).start();
}
});
Expand All @@ -157,6 +159,7 @@ class Tooltip extends PureComponent {
* Hide the tooltip in an animation.
*/
hideTooltip() {
this.animation.stopAnimation();
this.shouldStartShowAnimation = false;
Animated.timing(this.animation, {
toValue: 0,
Expand Down

0 comments on commit 2dc397d

Please sign in to comment.