try to fix bug about pixels not getting received

This commit is contained in:
HF 2020-04-26 00:14:55 +02:00
parent bdeb51fdb2
commit 1de40034a6

View File

@ -214,7 +214,7 @@ class Renderer {
const px = ((x - canX) * scaleM) + (CANVAS_WIDTH / 2);
const py = ((y - canY) * scaleM) + (CANVAS_HEIGHT / 2);
// if not part of our current canvas, do not render
if (px < 0 || py >= CANVAS_WIDTH || py < 0 || py >= CANVAS_HEIGHT) return;
if (px < 0 || px >= CANVAS_WIDTH || py < 0 || py >= CANVAS_HEIGHT) return;
context.fillStyle = palette.colors[color];
context.fillRect(px, py, scaleM, scaleM);