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