From fc7cab1217dc904a888240e577f4da5001cf4bdb Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sun, 14 Dec 2014 00:40:06 +0100 Subject: [PATCH] Fix move numbering when navigating in history. --- www/js/book.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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) + ". …"); } } -- 2.39.2