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");