X-Git-Url: https://git.sesse.net/?p=remoteglot;a=blobdiff_plain;f=www%2Fjs%2Fremoteglot.js;h=0cca9fa3dbc1e58ee15718dc87f5f4b80ac2ccf1;hp=92ad761396e3f91d3a8696bcde8d1442b6344206;hb=a87944ae9bedc34049b01e584b0a8ab7fccdc767;hpb=76f3975622196fa36f307da6b94df6222f904954 diff --git a/www/js/remoteglot.js b/www/js/remoteglot.js index 92ad761..0cca9fa 100644 --- a/www/js/remoteglot.js +++ b/www/js/remoteglot.js @@ -655,11 +655,16 @@ var collapse_history = function(truncate_history) { } window['collapse_history'] = collapse_history; +/** Update the HTML display of multi-PV from the global "refutation_lines". + * + * Also recreates the global "display_lines". + */ var update_refutation_lines = function() { if (fen === null) { return; } if (display_lines.length > 2) { + // Truncate so that only the history and PV is left. display_lines = [ display_lines[0], display_lines[1] ]; } @@ -716,6 +721,9 @@ var update_refutation_lines = function() { } /** + * Create a Chess.js board object, containing the given position plus the given moves, + * up to the given limit. + * * @param {?string} fen * @param {Array.} moves * @param {number} last_move