current_analysis_request_timer = setTimeout(function() { request_update(); }, timeout);
}
}).fail(function(jqXHR, textStatus, errorThrown) {
+ document.body.style.opacity = null;
if (textStatus === "abort") {
// Aborted because we are switching backends. Abandon and don't retry,
// because another one is already started for us.
/** Update all the HTML on the page, based on current global state.
*/
var update_board = function() {
+ document.body.style.opacity = null;
+
var data = displayed_analysis_data || current_analysis_data;
var current_data = current_analysis_data; // Convenience alias.
var black_imbalance = '';
for (var piece in imbalance) {
for (var i = 0; i < imbalance[piece]; ++i) {
- white_imbalance += '<img src="' + svg_pieces['w' + piece.toUpperCase()] + '" alt="" style="width: 15px;height: 15px;">';
+ white_imbalance += '<img src="' + svg_pieces['w' + piece.toUpperCase()] + '" alt="" style="width: 15px;height: 15px;" class="imbalance-piece">';
+ white_imbalance += '<img src="' + svg_pieces['b' + piece.toUpperCase()] + '" alt="" style="width: 15px;height: 15px;" class="imbalance-inverted-piece">';
}
for (var i = 0; i < -imbalance[piece]; ++i) {
- black_imbalance += '<img src="' + svg_pieces['b' + piece.toUpperCase()] + '" alt="" style="width: 15px;height: 15px;">';
+ black_imbalance += '<img src="' + svg_pieces['b' + piece.toUpperCase()] + '" alt="" style="width: 15px;height: 15px;" class="imbalance-piece">';
+ black_imbalance += '<img src="' + svg_pieces['w' + piece.toUpperCase()] + '" alt="" style="width: 15px;height: 15px;" class="imbalance-inverted-piece">';
}
}
$('#whiteimbalance').html(white_imbalance);