Clean up display_lines[] as needed.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 21 Nov 2013 21:58:10 +0000 (22:58 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 21 Nov 2013 21:58:10 +0000 (22:58 +0100)
www/js/remoteglot.js

index c9ff8d8..80a5db9 100644 (file)
@@ -317,6 +317,10 @@ var update_highlight = function()  {
 }
 
 var update_refutation_lines = function(board) {
+       if (display_lines.length > 1) {
+               display_lines = [ display_lines[0] ];
+       }
+
        var tbl = $("#refutationlines");
        tbl.empty();
 
@@ -370,6 +374,8 @@ var update_refutation_lines = function(board) {
 }
 
 var update_board = function(board, data, num_viewers) {
+       display_lines = [];
+
        // The headline.
        var headline = 'Analysis';
        if (data.position.last_move !== 'none') {