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

Fix the horizontal scale using your vertical position

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

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

@@ -463,7 +463,7 @@ function drawHorizontalScale(ifDirty = false) {
return; return;
function drawTicks(/** @type {CanvasRenderingContext2D} */ ctx, pixelsPer, heightPer) { function drawTicks(/** @type {CanvasRenderingContext2D} */ ctx, pixelsPer, heightPer) {
let total = heightPer.clone(); let total = heightPer.clone();
total.value = math.unit(config.y, "meters").toNumber(config.unit) * ctx.canvas.width / ctx.canvas.height;
total.value = math.unit(config.x, "meters").toNumber(config.unit) * ctx.canvas.width / ctx.canvas.height;
for (let x = ctx.canvas.clientWidth - 50; x >= 50; x -= pixelsPer) { for (let x = ctx.canvas.clientWidth - 50; x >= 50; x -= pixelsPer) {
drawTick(ctx, x, 50, total); drawTick(ctx, x, 50, total);
total = math.add(total, heightPer); total = math.add(total, heightPer);


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