From 9765c6909b3388c7ccb04bea5d661df8dea8ee63 Mon Sep 17 00:00:00 2001 From: Justin Hawkins Date: Sun, 27 Mar 2022 14:51:56 +1030 Subject: [PATCH] Fix the scaling. --- web/data/editor.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/data/editor.html b/web/data/editor.html index efab6cc..9966bb6 100644 --- a/web/data/editor.html +++ b/web/data/editor.html @@ -175,8 +175,8 @@ function editor() { } function scalefactor(width, height) { - max_width = 800; - max_height = 600; + max_width = window.innerWidth * 3/5; + max_height = window.innerHeight * 5/6; if (width <= max_width && height <= max_height) { return 1.0; @@ -187,7 +187,7 @@ function scalefactor(width, height) { return factor; } - return height/max_height; + return 1/ (height/max_height); }