improve round
This commit is contained in:
parent
8cd90f9e73
commit
e26b422378
|
@ -1072,6 +1072,8 @@ div.lichess_table.finished div.lichess_player p {
|
|||
}
|
||||
div.cemetery {
|
||||
margin: 10px 0;
|
||||
height: 32px;
|
||||
line-height: 0;
|
||||
}
|
||||
div.cemetery .tomb {
|
||||
display: inline-block;
|
||||
|
|
|
@ -122,3 +122,6 @@ body.is3d .cg-piece {
|
|||
.cg-piece.ghost {
|
||||
opacity: 0.3;
|
||||
}
|
||||
body.is3d .cg-piece.ghost {
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
|
|
@ -16,19 +16,21 @@ module.exports = function(send, ctrl) {
|
|||
});
|
||||
},
|
||||
state: function(o) {
|
||||
m.startComputation();
|
||||
ctrl.chessground.set({
|
||||
turnColor: o.color
|
||||
});
|
||||
ctrl.data.game.player = o.color;
|
||||
ctrl.data.game.turns = o.turns;
|
||||
m.endComputation();
|
||||
},
|
||||
move: function(o) {
|
||||
m.startComputation();
|
||||
ctrl.chessground.apiMove(o.from, o.to);
|
||||
if (ctrl.data.game.threefold) {
|
||||
m.startComputation();
|
||||
ctrl.data.game.threefold = false;
|
||||
m.endComputation();
|
||||
}
|
||||
m.endComputation();
|
||||
},
|
||||
premove: function() {
|
||||
ctrl.chessground.playPremove();
|
||||
|
@ -94,7 +96,7 @@ module.exports = function(send, ctrl) {
|
|||
};
|
||||
|
||||
this.receive = function(type, data) {
|
||||
if (type != 'n') console.log(type, data);
|
||||
// if (type != 'n') console.log(type, data);
|
||||
if (handlers[type]) {
|
||||
handlers[type](data);
|
||||
return true;
|
||||
|
|
|
@ -22,6 +22,7 @@ function renderMaterial(ctrl, material) {
|
|||
|
||||
module.exports = function(ctrl) {
|
||||
var material = ctrl.data.pref.showCaptured ? chessground.board.getMaterialDiff(ctrl.chessground.data) : false;
|
||||
console.log('render');
|
||||
return m('div.lichess_game.cg-512', {
|
||||
config: function(el, isUpdate, context) {
|
||||
if (isUpdate) return;
|
||||
|
|
Loading…
Reference in a new issue