Fix some minor canvas errors

This commit is contained in:
Wuzzy 2023-10-27 18:51:11 +02:00
parent e575801481
commit 5fcc3f3e5d

View File

@ -932,6 +932,7 @@ function checkDrawValid(context) {
putResizeCorner(context);
return false;
}
drawError = false;
return true;
}
@ -947,10 +948,10 @@ function drawModern(recalculate) {
// shorter function name (for "convert")
let conv = biomeCoordsToCanvasPixelCoords
clear(context);
if (!checkDrawValid(context)) {
return false;
}
clear(context);
let points = getRenderedPoints(y);
// Fail and render a special message if there are no biomes
@ -1142,14 +1143,11 @@ function drawV6() {
let h = voronoiCanvas.height;
let y = getViewY();
clear(context);
if (!checkDrawValid(context)) {
return false;
}
clear(context);
if (v6_flag_snowbiomes) {
let cx, cy;
@ -1253,6 +1251,8 @@ function drawV6() {
if (showAxes) {
putAxes(context);
}
putResizeCorner(context);
}
function draw(recalculate) {