Skip to content

Commit

Permalink
Fix display resizing (hobbyfarm#206)
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilipAB authored Jun 7, 2024
1 parent d693e4a commit eed3005
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/scenario/guacTerminal.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -410,8 +410,8 @@ export class GuacTerminalComponent implements OnChanges {
// setting timeout so display has time to get the correct size
setTimeout(() => {
const scale = Math.min(
Math.floor(elm.clientWidth / Math.max(this.display.getWidth(), 1)),
Math.floor(elm.clientHeight / Math.max(this.display.getHeight(), 1)),
elm.clientWidth / Math.max(this.display.getWidth(), 1),
elm.clientHeight / Math.max(this.display.getHeight(), 1),
);
this.display.scale(scale);
}, 100);
Expand Down

0 comments on commit eed3005

Please sign in to comment.