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;