show analysis cp for every move

pull/83/head
Thibault Duplessis 2012-08-02 15:57:35 +02:00
parent 17dd458c8f
commit ea3a2169eb
4 changed files with 10 additions and 5 deletions

View File

@ -7,7 +7,7 @@ import play.api.templates.Html
trait AssetHelper {
val assetVersion = 65
val assetVersion = 66
def cssTag(name: String) = css("stylesheets/" + name)

View File

@ -59,7 +59,6 @@ function posToSquareId(pos) {
function customFunctionOnMove() {
var $comment = $('#GameLastComment');
$comment.toggle($comment.find('> .comment').text().length > 0);
var moves = $comment.find('.commentMove').map(function() { return $(this).text(); });
var ids = $.map(moves, posToSquareId);
$("#GameBoard img.bestmove").removeClass("bestmove");
@ -67,10 +66,13 @@ function customFunctionOnMove() {
if (this) $("#" + this).addClass("bestmove");
});
refreshButtonset();
var chart = $("div.adv_chart").data("chart");
var $chart = $("div.adv_chart");
var chart = $chart.data("chart");
if (chart) {
var index = CurrentPly - 1;
chart.setSelection([{ row: index, column: 1}]);
var rows = $chart.data('rows');
$comment.prepend($("<p>").html("White advantage: <strong>" + rows[index][1] + "</strong>"));
}
var turn = Math.round(CurrentPly / 2);
var $gameText = $("#GameText");

View File

@ -109,9 +109,13 @@ span.board_mark.horz {
position: absolute;
top: 512px;
margin-top: 1em;
font-size: 1.4em;
width: 220px;
}
#GameLastComment .comment {
margin-top: 0.2em;
font-size: 1.3em;
display: block;
}
div.advice_summary {
position: absolute;
top: 740px;

1
todo
View File

@ -30,7 +30,6 @@ game stats timeline issues http://en.lichess.org/forum/lichess-feedback/move-tim
propagate IP ban to the user
admin ip search interface
analyse: show main line for every move http://en.lichess.org/forum/lichess-feedback/about-the-analysis-feature#5
analyse: show cp every move (as graph popup?)
clock in AI game
try to show last analysis cp on graph (move 26) http://en.lichess.org/analyse/bwxnx0al
elo range must contain player elo