Просмотр исходного кода

Fix a bug causing altitudes to be drawn at the wrong height when not using meters

master
Fen Dweller 5 лет назад
Родитель
Сommit
5222d1a8d0
1 измененных файлов: 1 добавлений и 1 удалений
  1. +1
    -1
      macrovision.js

+ 1
- 1
macrovision.js Просмотреть файл

@@ -564,7 +564,7 @@ function drawVerticalScale(ifDirty = false) {
} }


function drawAltitudeLine(ctx, height, label) { 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; const y = ctx.canvas.clientHeight - 50 - (height.toNumber("meters") - config.y) * pixelScale;
if (y < ctx.canvas.clientHeight - 100) { if (y < ctx.canvas.clientHeight - 100) {
drawTick(ctx, 50, y, label, true); drawTick(ctx, 50, y, label, true);


Загрузка…
Отмена
Сохранить