]> git.xonotic.org Git - xonotic/xonstat.git/commitdiff
Also fixed the damage graph tooltips
authorJan D. Behrens <zykure@web.de>
Sat, 4 Aug 2012 14:31:05 +0000 (16:31 +0200)
committerJan D. Behrens <zykure@web.de>
Sat, 4 Aug 2012 14:31:05 +0000 (16:31 +0200)
xonstat/templates/player_info.mako

index c16afb6bf0f2b44f822960c99978c1f746976293..ff148b398fb5fa777fe3c81ec649045c635b6e46 100644 (file)
@@ -100,8 +100,9 @@ ${nav.nav('players')}
 
           $('#dmg-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),
@@ -113,6 +114,7 @@ ${nav.nav('players')}
               else {
                   $("#tooltip").remove();
                   previousPoint = null;
+                  previousLabel = null;
               }
           });