Fix the scaling.

This commit is contained in:
Justin Hawkins 2022-03-27 14:51:56 +10:30
parent 536657e0e8
commit 9765c6909b

View File

@ -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);
}
</script>