From: Geoffrey Allott Date: Fri, 16 Jun 2023 17:27:36 +0000 (+0100) Subject: fix some visual glitches X-Git-Url: https://git.pointlesshacks.com/?a=commitdiff_plain;h=f0363c5757174d1c1cd72c92983bb55922bce161;p=pokerwave.git fix some visual glitches --- diff --git a/site/modules/cribbage.js b/site/modules/cribbage.js index f21ba6c..1f14fe9 100644 --- a/site/modules/cribbage.js +++ b/site/modules/cribbage.js @@ -105,7 +105,7 @@ export class Cribbage extends GameWithChat { const sep = username === this.username ? 60 : 20; const offset = (cards.length - 3/2) * sep / 2; let x = 227.5 + offset - 180 * Math.sin(angle); - const y = username === this.username ? 450 : 210 + 120 * Math.cos(angle); + const y = username === this.username ? 500 : 210 + 120 * Math.cos(angle); const width = username === this.username ? 90 : 45; const height = username === this.username ? 140 : 70; for (const {card, image} of cards) { diff --git a/site/modules/whist.js b/site/modules/whist.js index f324b71..1f5944d 100644 --- a/site/modules/whist.js +++ b/site/modules/whist.js @@ -90,7 +90,7 @@ export class KnockOutWhist extends GameWithChat { const sep = username === this.username ? 60 : 20; const offset = (cards.length - 3/2) * sep / 2; let x = 227.5 + offset - 180 * Math.sin(angle); - const y = username === this.username ? 450 : 210 + 120 * Math.cos(angle); + const y = username === this.username ? 500 : 210 + 120 * Math.cos(angle); const width = username === this.username ? 90 : 45; const height = username === this.username ? 140 : 70; for (const {card, image} of cards) { @@ -108,6 +108,8 @@ export class KnockOutWhist extends GameWithChat { image.classList.remove("my-card"); image.setAttribute("x", x); image.setAttribute("y", y); + image.setAttribute("width", 45); + image.setAttribute("height", 70); x -= 20; } x = 120.0;