From: Steinar H. Gunderson Date: Thu, 21 Nov 2013 21:58:10 +0000 (+0100) Subject: Clean up display_lines[] as needed. X-Git-Url: https://git.sesse.net/?p=remoteglot;a=commitdiff_plain;h=33bc30f3fd0026d8fae3107b5154bbc03f5f8673;ds=sidebyside Clean up display_lines[] as needed. --- diff --git a/www/js/remoteglot.js b/www/js/remoteglot.js index c9ff8d8..80a5db9 100644 --- a/www/js/remoteglot.js +++ b/www/js/remoteglot.js @@ -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') {