diff options
author | Simon Rettberg | 2022-07-20 14:14:45 +0200 |
---|---|---|
committer | Simon Rettberg | 2022-07-20 14:14:45 +0200 |
commit | 1684623d85b77165cb1a5ef354df0a69a5b56259 (patch) | |
tree | 0ab0be2cec36dd33306c80e5889b5628210aeeb3 /modules-available | |
parent | Update translations (diff) | |
download | slx-admin-1684623d85b77165cb1a5ef354df0a69a5b56259.tar.gz slx-admin-1684623d85b77165cb1a5ef354df0a69a5b56259.tar.xz slx-admin-1684623d85b77165cb1a5ef354df0a69a5b56259.zip |
[statistics] chart: Fix table highlight not resetting on mouseout
Apparently, Chart.js doesn't fire a new onHover event if the mouse
leaves a piece of the pie chart without moving over the blank area
withing the canvas first. So we need an additional event for when the
mouse cursor leaves the canvas.
Diffstat (limited to 'modules-available')
-rw-r--r-- | modules-available/statistics/clientscript.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/modules-available/statistics/clientscript.js b/modules-available/statistics/clientscript.js index 90be29e9..3c166f64 100644 --- a/modules-available/statistics/clientscript.js +++ b/modules-available/statistics/clientscript.js @@ -35,6 +35,12 @@ function makePieChart($parent) { } } }); + $canv.mouseout(function() { + if (cur !== null) { + $($dest + cur).removeClass('slx-bold'); + cur = null; + } + }); })(); } |