From 8de456e69e5748f49e9d58568519d6f1a264c444 Mon Sep 17 00:00:00 2001 From: "Jan D. Behrens" Date: Fri, 3 Aug 2012 13:23:43 +0200 Subject: [PATCH] Fixed tooltip bug in accuracy/damage graphs --- xonstat/templates/player_info.mako | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; } }); -- 2.39.2