From: Jan D. Behrens Date: Fri, 3 Aug 2012 11:23:43 +0000 (+0200) Subject: Fixed tooltip bug in accuracy/damage graphs X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8de456e69e5748f49e9d58568519d6f1a264c444;p=xonotic%2Fxonstat.git Fixed tooltip bug in accuracy/damage graphs --- diff --git a/xonstat/templates/player_info.mako b/xonstat/templates/player_info.mako index 1983509..2b58046 100644 --- a/xonstat/templates/player_info.mako +++ b/xonstat/templates/player_info.mako @@ -77,10 +77,12 @@ ${nav.nav('players')} } var previousPoint = null; + var previousLabel = null; $('#acc-graph').bind("plothover", function (event, pos, item) { if (item) { - if (previousPoint != item.dataIndex) { + if ((previousLabel != item.series.label) || (previousPoint != item.dataIndex)) { previousPoint = item.dataIndex; + previousLabel = item.series.label; $("#tooltip").remove(); var x = item.datapoint[0].toFixed(2), @@ -92,6 +94,7 @@ ${nav.nav('players')} else { $("#tooltip").remove(); previousPoint = null; + previousLabel = null; } });