From e799f3df3bc34d217ee651babae57752c52a1d70 Mon Sep 17 00:00:00 2001 From: Chris Malloy Date: Mon, 14 Oct 2024 20:17:48 -0300 Subject: [PATCH] Fixed backgammon resize --- src/app/component/backgammon/backgammon.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/component/backgammon/backgammon.component.ts b/src/app/component/backgammon/backgammon.component.ts index c0b5ff9d0..3e79e57d2 100644 --- a/src/app/component/backgammon/backgammon.component.ts +++ b/src/app/component/backgammon/backgammon.component.ts @@ -290,9 +290,9 @@ export class BackgammonComponent implements OnInit, AfterViewInit, OnChanges, On @HostListener('window:resize') onResize() { const dim = Math.floor(Math.min( - innerWidth - 20, + innerWidth - 4, innerHeight - 20, - this.el.nativeElement.parentElement?.offsetWidth || 100, + this.el.nativeElement.parentElement?.offsetWidth || screen.width, ) / 28); const fontSize = Math.floor(1.5 * dim); this.el.nativeElement.style.setProperty('--dim', dim + 'px')