Fix the scaling.
This commit is contained in:
parent
536657e0e8
commit
9765c6909b
@ -175,8 +175,8 @@ function editor() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function scalefactor(width, height) {
|
function scalefactor(width, height) {
|
||||||
max_width = 800;
|
max_width = window.innerWidth * 3/5;
|
||||||
max_height = 600;
|
max_height = window.innerHeight * 5/6;
|
||||||
|
|
||||||
if (width <= max_width && height <= max_height) {
|
if (width <= max_width && height <= max_height) {
|
||||||
return 1.0;
|
return 1.0;
|
||||||
@ -187,7 +187,7 @@ function scalefactor(width, height) {
|
|||||||
return factor;
|
return factor;
|
||||||
}
|
}
|
||||||
|
|
||||||
return height/max_height;
|
return 1/ (height/max_height);
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user