]> git.sesse.net Git - remoteglot/blobdiff - www/js/remoteglot.js
Fix extremely slow sparkline clicks.
[remoteglot] / www / js / remoteglot.js
index bed5a5cdf8ad3d1fdd4de3eb9cff1f8b39d17b4b..97efaca26b1e3f47f6541710f8566a4a7c3214d6 100644 (file)
@@ -754,6 +754,7 @@ var update_history = function() {
                        '(<a class="move" href="javascript:collapse_history(true)">collapse</a>) ' +
                        print_pv(0));
        }
+       update_move_highlight();
 }
 
 /**
@@ -1339,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',
@@ -1350,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();