From cd19cfc526cf4dc69f7ddc31585ac7d0efc21e63 Mon Sep 17 00:00:00 2001 From: Alex Yusiuk <55661041+RRRadicalEdward@users.noreply.github.com> Date: Fri, 20 Jun 2025 14:17:19 +0300 Subject: [PATCH] fix(web): fix fullscreen mode scale calculations (#828) --- .../iron-remote-desktop/src/iron-remote-desktop.svelte | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/web-client/iron-remote-desktop/src/iron-remote-desktop.svelte b/web-client/iron-remote-desktop/src/iron-remote-desktop.svelte index d092e816..8cfff210 100644 --- a/web-client/iron-remote-desktop/src/iron-remote-desktop.svelte +++ b/web-client/iron-remote-desktop/src/iron-remote-desktop.svelte @@ -523,15 +523,14 @@ function fullResize() { const windowSize = getWindowSize(); - const wrapperBoundingBox = wrapper.getBoundingClientRect(); - const containerWidth = windowSize.x - wrapperBoundingBox.x; - const containerHeight = windowSize.y - wrapperBoundingBox.y; + const containerWidth = windowSize.x; + const containerHeight = windowSize.y; let width = canvas.width; let height = canvas.height; - const ratio = Math.max(containerWidth / canvas.width, containerHeight / canvas.height); + const ratio = Math.min(containerWidth / canvas.width, containerHeight / canvas.height); width = width * ratio; height = height * ratio;