From 3e7bd913ebd69bbceb5385a542d55cf9c8fbdb61 Mon Sep 17 00:00:00 2001 From: Fen Dweller Date: Sat, 3 Oct 2020 12:03:58 -0400 Subject: [PATCH] Fix altitude lines ignoring vertical camera movement --- macrovision.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macrovision.js b/macrovision.js index 21c54cc3..17b8daf8 100644 --- a/macrovision.js +++ b/macrovision.js @@ -502,7 +502,7 @@ function drawVerticalScale(ifDirty = false) { function drawAltitudeLine(ctx, height, label) { const pixelScale = (ctx.canvas.clientHeight - 100) / config.height.toNumber(); - const y = ctx.canvas.clientHeight - 50 - height.toNumber("meters") * pixelScale; + const y = ctx.canvas.clientHeight - 50 - (height.toNumber("meters") - config.y) * pixelScale; if (y < ctx.canvas.clientHeight - 100) { drawTick(ctx, 50, y, label, true); }