]> git.sesse.net Git - remoteglot/commitdiff
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 c9ff8d8291f4f8f2799a6e83a1003868d59fa4b0..80a5db9d9bb9696961c94002f90213ec24b077c0 100644 (file)
@@ -317,6 +317,10 @@ var update_highlight = function()  {
 }
 
 var update_refutation_lines = function(board) {
 }
 
 var update_refutation_lines = function(board) {
+       if (display_lines.length > 1) {
+               display_lines = [ display_lines[0] ];
+       }
+
        var tbl = $("#refutationlines");
        tbl.empty();
 
        var tbl = $("#refutationlines");
        tbl.empty();
 
@@ -370,6 +374,8 @@ var update_refutation_lines = function(board) {
 }
 
 var update_board = function(board, data, num_viewers) {
 }
 
 var update_board = function(board, data, num_viewers) {
+       display_lines = [];
+
        // The headline.
        var headline = 'Analysis';
        if (data.position.last_move !== 'none') {
        // The headline.
        var headline = 'Analysis';
        if (data.position.last_move !== 'none') {