X-Git-Url: https://git.auder.net/?p=xogo.git;a=blobdiff_plain;f=base_rules.js;h=8b070598b1ab5a0f24009d5d7d79c3412267416f;hp=8ad0894e2972c074d8474844e15d52511fefc7d8;hb=a2bb7e0621f143f912ca505fed914fe0a5e6d611;hpb=cc9fe4f154ec244cbec468d1a3b5845e56cb378d diff --git a/base_rules.js b/base_rules.js index 8ad0894..8b07059 100644 --- a/base_rules.js +++ b/base_rules.js @@ -1007,6 +1007,8 @@ export default class ChessRules { let chessboard = container.querySelector(".chessboard"); let choices = document.createElement("div"); choices.id = "choices"; + if (!r) + r = chessboard.getBoundingClientRect(); choices.style.width = r.width + "px"; choices.style.height = r.height + "px"; choices.style.left = r.x + "px";