Skip to content

Commit

Permalink
Fixed backgammon resize
Browse files Browse the repository at this point in the history
  • Loading branch information
cjmalloy committed Oct 15, 2024
1 parent 611c44d commit e799f3d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/component/backgammon/backgammon.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit e799f3d

Please sign in to comment.