From: Steinar H. Gunderson Date: Sun, 2 Aug 2020 14:56:45 +0000 (+0200) Subject: Fix extremely slow sparkline clicks. X-Git-Url: https://git.sesse.net/?p=remoteglot;a=commitdiff_plain;h=045fcbf700505f71416672ab1aaa2fbe6f7e58e4 Fix extremely slow sparkline clicks. --- diff --git a/www/js/remoteglot.js b/www/js/remoteglot.js index 2ba3fe9..97efaca 100644 --- a/www/js/remoteglot.js +++ b/www/js/remoteglot.js @@ -1340,6 +1340,7 @@ var update_sparkline = function(data) { } // FIXME: at some widths, calling sparkline() seems to push // #scorecontainer under the board. + $('#scorespark').unbind('sparklineClick'); $("#scorespark").sparkline(scores, { type: 'bar', zeroColor: 'gray', @@ -1351,6 +1352,7 @@ var update_sparkline = function(data) { return format_tooltip(data, fields[0].offset + first_move_num - 1); } }); + $('#scorespark').unbind('sparklineClick'); $('#scorespark').bind('sparklineClick', function(event) { var sparkline = event.sparklines[0]; var region = sparkline.getCurrentRegionFields();