From eec6c28ab1b203590aa6197002790d30fd604537 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Thu, 25 Dec 2014 01:55:10 +0100 Subject: [PATCH] Add support for flipping the board. --- www/book.html | 3 +++ www/js/book.js | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/www/book.html b/www/book.html index 50fd70e..baaa40d 100644 --- a/www/book.html +++ b/www/book.html @@ -26,6 +26,9 @@ +

diff --git a/www/js/book.js b/www/js/book.js index 7a4d7ee..8785a34 100644 --- a/www/js/book.js +++ b/www/js/book.js @@ -281,6 +281,11 @@ var set_includetransp = function(value) { } window['set_includetransp'] = set_includetransp; +var set_flipboard = function(value) { + board.orientation(value ? 'black' : 'white'); +} +window['set_flipboard'] = set_flipboard; + var make_move = function(move, do_update) { var history = game.history({ verbose: true }); if (move_override < history.length && history[move_override].san == move) { -- 2.39.2