From: Steinar H. Gunderson Date: Sat, 13 Dec 2014 23:40:06 +0000 (+0100) Subject: Fix move numbering when navigating in history. X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=fc7cab1217dc904a888240e577f4da5001cf4bdb;p=remoteglot-book Fix move numbering when navigating in history. --- diff --git a/www/js/book.js b/www/js/book.js index 8f0c241..9ed5ee5 100644 --- a/www/js/book.js +++ b/www/js/book.js @@ -191,10 +191,10 @@ var show_lines = function(data, game) { tr.appendChild(td); $(td).addClass("move"); if (line[j] !== undefined) { - if (history.length % 2 == 0) { - $(td).text(((history.length / 2) + 1) + ". "); + if (move_override % 2 == 0) { + $(td).text(((move_override / 2) + 1) + ". "); } else { - $(td).text(((history.length / 2) + 0.5) + ". …"); + $(td).text(((move_override / 2) + 0.5) + ". …"); } }