embedded study max ground width

This commit is contained in:
Thibault Duplessis 2016-10-20 13:45:52 +02:00
parent b0eeb4abff
commit e920c2e53e
3 changed files with 6 additions and 5 deletions

View file

@ -55,10 +55,11 @@
var boardSize = h;
var gr = 1.618;
if (boardSize > w / gr) boardSize = w / gr;
var groundSize = Math.max(120, w - boardSize);
var groundSize = Math.min(500, Math.max(120, w - boardSize));
board.style.width = boardSize + 'px';
board.style.height = boardSize + 'px';
ground.style.width = groundSize + 'px';
ground.style.maxWidth = groundSize + 'px';
document.body.dispatchEvent(new Event('chessground.resize'));
};
onResize();

View file

@ -351,7 +351,7 @@ lichess.pubsub = (function() {
};
})();
lichess.hasToReload = false;
lichess.redirectInProgress;
lichess.redirectInProgress = false;
lichess.reload = function() {
if (lichess.redirectInProgress) return;
lichess.hasToReload = true;

View file

@ -11,9 +11,9 @@ div.lichess_game {
height: 100%;
flex-flow: row nowrap;
}
div.lichess_game div.lichess_board_wrap {
flex: 1 1 100%;
}
/* div.lichess_game div.lichess_board_wrap { */
/* flex: 1 1 100%; */
/* } */
div.lichess_game div.lichess_ground {
flex: 1 1 100%;
padding-left: 0;