From 5222d1a8d0ab3d044d6d55d94f2708b11ad6f03b Mon Sep 17 00:00:00 2001 From: Fen Dweller Date: Thu, 4 Mar 2021 20:09:47 -0500 Subject: [PATCH] Fix a bug causing altitudes to be drawn at the wrong height when not using meters --- macrovision.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macrovision.js b/macrovision.js index d0d1f5c2..1ebf5d57 100644 --- a/macrovision.js +++ b/macrovision.js @@ -564,7 +564,7 @@ function drawVerticalScale(ifDirty = false) { } function drawAltitudeLine(ctx, height, label) { - const pixelScale = (ctx.canvas.clientHeight - 100) / config.height.toNumber(); + const pixelScale = (ctx.canvas.clientHeight - 100) / config.height.toNumber("meters"); const y = ctx.canvas.clientHeight - 50 - (height.toNumber("meters") - config.y) * pixelScale; if (y < ctx.canvas.clientHeight - 100) { drawTick(ctx, 50, y, label, true);