let from_y, to_y, from_x, to_x;
if (board.orientation() === 'black') {
from_y = (arrow.from_row + 0.5)*square_width;
let from_y, to_y, from_x, to_x;
if (board.orientation() === 'black') {
from_y = (arrow.from_row + 0.5)*square_width;
let SVG_NS = "http://www.w3.org/2000/svg";
let XHTML_NS = "http://www.w3.org/1999/xhtml";
let svg = document.createElementNS(SVG_NS, "svg");
let SVG_NS = "http://www.w3.org/2000/svg";
let XHTML_NS = "http://www.w3.org/1999/xhtml";
let svg = document.createElementNS(SVG_NS, "svg");
- svg.setAttribute("width", /** @type{number} */ (document.getElementById("board").getBoundingClientRect().width));
- svg.setAttribute("height", /** @type{number} */ (document.getElementById("board").getBoundingClientRect().height));
+ svg.setAttribute("width", board_width);
+ svg.setAttribute("height", board_width);
svg.setAttribute("style", "position: absolute");
svg.setAttribute("position", "absolute");
svg.setAttribute("version", "1.1");
svg.setAttribute("style", "position: absolute");
svg.setAttribute("position", "absolute");
svg.setAttribute("version", "1.1");
let pv_score = undefined;
for (let move in data['refutation_lines']) {
let line = data['refutation_lines'][move];
let pv_score = undefined;
for (let move in data['refutation_lines']) {
let line = data['refutation_lines'][move];
- let score = compute_score_sort_key(line['score'], line['depth'], invert, false);
+ let score = compute_score_sort_key(line['score'], line['depth'], invert);
* @param score The score digest tuple.
* @param {?number} depth Depth the move has been computed to, or null.
* @param {boolean} invert Whether black is to play.
* @param score The score digest tuple.
* @param {?number} depth Depth the move has been computed to, or null.
* @param {boolean} invert Whether black is to play.
-let compute_score_sort_key = function(score, depth, invert, depth_secondary_key) {
+let compute_score_sort_key = function(score, depth, invert) {