mirror of
https://github.com/Devolutions/IronRDP.git
synced 2025-08-04 15:18:17 +00:00
fix(web): fix fullscreen mode scale calculations (#828)
This commit is contained in:
parent
7829f4adb1
commit
cd19cfc526
1 changed files with 3 additions and 4 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue