]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Fix bug in opacity handling (#7047)
authorBen McCann <322311+benmccann@users.noreply.github.com>
Sat, 1 Feb 2020 13:20:22 +0000 (05:20 -0800)
committerGitHub <noreply@github.com>
Sat, 1 Feb 2020 13:20:22 +0000 (08:20 -0500)
src/plugins/plugin.tooltip.js

index f5c136e9be93e6584fbc4533974ff4c22aa8f5cb..a1ef6f181cf00abc50f4a3edba113e211820af68 100644 (file)
@@ -925,7 +925,7 @@ class Tooltip extends Element {
                };
 
                // IE11/Edge does not like very small opacities, so snap to 0
-               opacity = Math.abs(opacity < 1e-3) ? 0 : opacity;
+               opacity = Math.abs(opacity) < 1e-3 ? 0 : opacity;
 
                // Truthy/falsey value for empty tooltip
                var hasTooltipContent = me.title.length || me.beforeBody.length || me.body.length || me.afterBody.length || me.footer.length;